Class ApiError
A failure's ErrorInfo, read: its reason, and the field and resource it names.
public sealed record ApiError : IEquatable<ApiError>
- Inheritance
-
ApiError
- Implements
- Inherited Members
Constructors
ApiError(StatusCode, string, string?, string?, ErrorInfo)
A failure's ErrorInfo, read: its reason, and the field and resource it names.
public ApiError(StatusCode Code, string Reason, string? Field, string? Resource, ErrorInfo Info)
Parameters
CodeStatusCodeThe gRPC status code.
ReasonstringOne of ErrorReasons.
FieldstringThe request field concerned, when there is one.
ResourcestringThe item concerned (an id, a key, a service), when there is one.
InfoErrorInfoThe whole
ErrorInfo, metadata included.
Properties
Code
The gRPC status code.
public StatusCode Code { get; init; }
Property Value
Field
The request field concerned, when there is one.
public string? Field { get; init; }
Property Value
Info
The whole ErrorInfo, metadata included.
public ErrorInfo Info { get; init; }
Property Value
Reason
One of ErrorReasons.
public string Reason { get; init; }
Property Value
Resource
The item concerned (an id, a key, a service), when there is one.
public string? Resource { get; init; }