Class ProblemDetails
- Namespace
- Arbiter.CommandQuery.Models
- Assembly
- Arbiter.CommandQuery.dll
A machine-readable format for specifying errors in HTTP API responses based on https://tools.ietf.org/html/rfc7807.
public class ProblemDetails
- Inheritance
-
ProblemDetails
- Inherited Members
Fields
ContentType
The content-type for a problem json response
public const string ContentType = "application/problem+json"
Field Value
Properties
Detail
A human-readable explanation specific to this occurrence of the problem.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyOrder(-2)]
[JsonPropertyName("detail")]
public string? Detail { get; set; }
Property Value
Errors
Gets the validation errors associated with this instance of problem details
[JsonPropertyName("errors")]
public IDictionary<string, string[]> Errors { get; set; }
Property Value
- IDictionary<string, string[]>
Extensions
Gets the IDictionary<TKey, TValue> for extension members.
Problem type definitions MAY extend the problem details object with additional members. Extension members appear in the same namespace as other members of a problem type.
[JsonExtensionData]
public IDictionary<string, object?> Extensions { get; set; }
Property Value
Remarks
The round-tripping behavior for Extensions is determined by the implementation of the Input \ Output formatters. In particular, complex types or collection types may not round-trip to the original type when using the built-in JSON or XML formatters.
Instance
A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyOrder(-1)]
[JsonPropertyName("instance")]
public string? Instance { get; set; }
Property Value
Status
The HTTP status code([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyOrder(-3)]
[JsonPropertyName("status")]
public int? Status { get; set; }
Property Value
- int?
Title
A short, human-readable summary of the problem type. It SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization(e.g., using proactive content negotiation; see[RFC7231], Section 3.4).
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyOrder(-4)]
[JsonPropertyName("title")]
public string? Title { get; set; }
Property Value
Type
A URI reference [RFC3986] that identifies the problem type. This specification encourages that, when dereferenced, it provide human-readable documentation for the problem type (e.g., using HTML [W3C.REC-html5-20141028]). When this member is not present, its value is assumed to be "about:blank".
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
[JsonPropertyOrder(-5)]
[JsonPropertyName("type")]
public string? Type { get; set; }