Appearance
Failure Method
Definition
- Namespace:
JASE.Web - Assembly:
JASE.Web.dll
PayloadResult Failure(ProblemDetails problem)
csharp
PayloadResult Failure(ProblemDetails problem)Creates a failed PayloadResult using the specified RFC 9457 ProblemDetails payload.
Parameters
| Name | Description |
|---|---|
problem | The ProblemDetails instance describing the error condition. |
Returns
A PayloadResult representing a failure response.
Remarks
This method is intended for error outcomes and standardizes the use of RFC 9457 problem responses.
The HTTP status code is derived from Status. If no status is provided, Status500InternalServerError is used.
The problem payload may be enriched at execution time with additional metadata such as the request path (instance) and a trace identifier.