Class MessageProblemDetails
Implementation of message problem details following RFC 7807.
public sealed class MessageProblemDetails : IMessageProblemDetails
- Inheritance
-
MessageProblemDetails
- Implements
- Inherited Members
- Extension Methods
Properties
Detail
Gets or sets a human-readable explanation specific to this occurrence of the problem.
public string Detail { get; set; }
Property Value
- string
The problem explanation.
ErrorCode
Gets or sets the application-specific error code.
public int ErrorCode { get; set; }
Property Value
- int
The application-specific error code.
Extensions
Gets or sets additional members that provide context-specific problem details.
public IDictionary<string, object?> Extensions { get; set; }
Property Value
- IDictionary<string, object>
A dictionary of additional members.
Instance
Gets or sets a URI reference that identifies the specific occurrence of the problem.
public string Instance { get; set; }
Property Value
- string
The occurrence URI.
Status
Gets or sets the HTTP status code generated by the origin server for this occurrence of the problem.
public int? Status { get; set; }
Property Value
- int?
The HTTP status code when available.
Title
Gets or sets a short, human-readable summary of the problem type.
public string Title { get; set; }
Property Value
- string
The problem summary.
Type
Gets or sets a URI reference that identifies the problem type.
public string Type { get; set; }
Property Value
- string
The problem type URI.
Methods
AuthorizationError(string)
Creates problem details for an authorization error.
public static IMessageProblemDetails AuthorizationError(string detail)
Parameters
detailstringThe error detail.
Returns
- IMessageProblemDetails
Problem details for authorization error.
InternalError(string)
Creates problem details for an internal error.
public static IMessageProblemDetails InternalError(string detail)
Parameters
detailstringThe error detail.
Returns
- IMessageProblemDetails
Problem details for internal error.
NotFound(string)
Creates problem details for a not found error.
public static IMessageProblemDetails NotFound(string detail)
Parameters
detailstringThe error detail.
Returns
- IMessageProblemDetails
Problem details for not found error.
ValidationError(string)
Creates problem details for a validation error.
public static IMessageProblemDetails ValidationError(string detail)
Parameters
detailstringThe error detail.
Returns
- IMessageProblemDetails
Problem details for validation error.