Class GrpcCallStatusCodes
The status vocabulary Gateway.Invoke / InvokeJson report in
InvokeResponse.status.
Every status the gateway emits MUST come from here. A downstream
RpcException used to be reported as
ex.StatusCode.ToString(), which is the PascalCase enum name
("NotFound") — so the same condition reached clients as
NOT_FOUND when the gateway detected it and NotFound when the
backend did. Use GrpcStatusCodeMap.ToGatewayStatus to translate.
public static class GrpcCallStatusCodes
- Inheritance
-
GrpcCallStatusCodes
- Inherited Members
Fields
Aborted
public const string Aborted = "ABORTED"
Field Value
AlreadyExists
public const string AlreadyExists = "ALREADY_EXISTS"
Field Value
Cancelled
public const string Cancelled = "CANCELLED"
Field Value
DeadlineExceeded
public const string DeadlineExceeded = "DEADLINE_EXCEEDED"
Field Value
FailedPrecondition
public const string FailedPrecondition = "FAILED_PRECONDITION"
Field Value
Internal
public const string Internal = "INTERNAL"
Field Value
InvalidArgument
gRPC's own name for this condition is INVALID_ARGUMENT.
public const string InvalidArgument = "INVALID_ARGUMENT"
Field Value
NotFound
public const string NotFound = "NOT_FOUND"
Field Value
Ok
public const string Ok = "OK"
Field Value
PermissionDenied
public const string PermissionDenied = "PERMISSION_DENIED"
Field Value
ResourceExhausted
public const string ResourceExhausted = "RESOURCE_EXHAUSTED"
Field Value
Unauthenticated
public const string Unauthenticated = "UNAUTHENTICATED"
Field Value
Unavailable
public const string Unavailable = "UNAVAILABLE"
Field Value
Unknown
public const string Unknown = "UNKNOWN"
Field Value
Unsupported
public const string Unsupported = "UNSUPPORTED"
Field Value
Methods
IndicatesBackendFault(string?)
Statuses that indicate the backend or the transport is unhealthy, as opposed to the caller having asked for something wrong. Only these should count towards opening the gateway circuit breaker — a client looping on a bad method name must not break the circuit for everyone else.
public static bool IndicatesBackendFault(string? status)
Parameters
statusstring