Class JobError
Job error.
public record JobError : IEquatable<JobError>
- Inheritance
-
JobError
- Implements
- Inherited Members
Properties
Code
The status code.
[JsonPropertyName("code")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public int? Code { get; set; }
Property Value
- int?
Details
A list of messages that carry the error details. There is a common set of message types for APIs to use.
[JsonPropertyName("details")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<string>? Details { get; set; }
Property Value
Message
A developer-facing error message, which should be in English. Any user-facing error message
should be localized and sent in the details field.
[JsonPropertyName("message")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Message { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a JobError object.
public static JobError? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- JobError
The deserialized JobError object, or null if deserialization fails.