Class ErrorObject
- Namespace
- JsonApiDotNetCore.Serialization.Objects
- Assembly
- JsonApiDotNetCore.dll
[PublicAPI]
public sealed class ErrorObject
- Inheritance
-
ErrorObject
- Inherited Members
-
Constructors
ErrorObject(HttpStatusCode)
public ErrorObject(HttpStatusCode statusCode)
Parameters
statusCode
HttpStatusCode
Properties
Code
[JsonPropertyName("code")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Code { get; set; }
Property Value
- string
Detail
[JsonPropertyName("detail")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Detail { get; set; }
Property Value
- string
Id
[JsonPropertyName("id")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Id { get; set; }
Property Value
- string
Links
[JsonPropertyName("links")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ErrorLinks? Links { get; set; }
Property Value
- ErrorLinks
[JsonPropertyName("meta")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public IDictionary<string, object?>? Meta { get; set; }
Property Value
- IDictionary<string, object>
Source
[JsonPropertyName("source")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ErrorSource? Source { get; set; }
Property Value
- ErrorSource
Status
[JsonPropertyName("status")]
[JsonIgnore(Condition = JsonIgnoreCondition.Never)]
public string Status { get; set; }
Property Value
- string
StatusCode
[JsonIgnore]
public HttpStatusCode StatusCode { get; set; }
Property Value
- HttpStatusCode
Title
[JsonPropertyName("title")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Title { get; set; }
Property Value
- string
Methods
GetResponseStatusCode(IReadOnlyList<ErrorObject>)
public static HttpStatusCode GetResponseStatusCode(IReadOnlyList<ErrorObject> errorObjects)
Parameters
errorObjects
IReadOnlyList<ErrorObject>
Returns
- HttpStatusCode