public enum GrpcStatusCode extends Enum<GrpcStatusCode>
| Enum Constant and Description |
|---|
ABORTED
Aborted, typically due to a concurrency issue (think CAS).
|
ALREADY_EXISTS
Some entity that we attempted to create already exists.
|
CANCELLED
Cancelled (typically by caller).
|
DATA_LOSS
Data corruption.
|
DEADLINE_EXCEEDED
Deadline expired.
|
FAILED_PRECONDITION
The action cannot be executed on the current system state.
|
INTERNAL
Internal invariant violated.
|
INVALID_ARGUMENT
Client specified an invalid argument.
|
NOT_FOUND
Some requested entity not found.
|
OK
Successful.
|
OUT_OF_RANGE
Used for range errors (e.g.
|
PERMISSION_DENIED
Permission denied for a particular client.
|
RESOURCE_EXHAUSTED
Resource exhausted.
|
UNAUTHENTICATED
Cannot authenticate the client.
|
UNAVAILABLE
Service unavailable, similar to 503, client may retry.
|
UNIMPLEMENTED
The method/operation is not implemented/supported.
|
UNKNOWN
Unknown error.
|
| Modifier and Type | Method and Description |
|---|---|
static GrpcStatusCode |
fromCodeValue(CharSequence codeValue)
Obtains the status code given a code value.
|
static GrpcStatusCode |
fromCodeValue(int codeValue)
Obtains the status code given an integer code value.
|
static GrpcStatusCode |
fromHttp2ErrorCode(Http2ErrorCode errorCode)
Convert from
Http2ErrorCode to GrpcStatus. |
GrpcStatus |
status()
Returns a standard
GrpcStatus with this status code. |
int |
value()
Returns the integer code value.
|
static GrpcStatusCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GrpcStatusCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GrpcStatusCode OK
public static final GrpcStatusCode CANCELLED
public static final GrpcStatusCode UNKNOWN
public static final GrpcStatusCode INVALID_ARGUMENT
public static final GrpcStatusCode DEADLINE_EXCEEDED
public static final GrpcStatusCode NOT_FOUND
public static final GrpcStatusCode ALREADY_EXISTS
public static final GrpcStatusCode PERMISSION_DENIED
RESOURCE_EXHAUSTED instead)UNAUTHENTICATED instead)public static final GrpcStatusCode RESOURCE_EXHAUSTED
public static final GrpcStatusCode FAILED_PRECONDITION
public static final GrpcStatusCode ABORTED
public static final GrpcStatusCode OUT_OF_RANGE
Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed if the system state changes.
For example, a 32-bit file system will generate INVALID_ARGUMENT if asked to read at an offset that is
not in the range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from an offset past the current
file size.
There is a fair bit of overlap with FAILED_PRECONDITION. This error is more specific and recommended
in scenarios when callers who are iterating through a space can easily look for an OUT_OF_RANGE error to detect
when they are done.
public static final GrpcStatusCode UNIMPLEMENTED
public static final GrpcStatusCode INTERNAL
public static final GrpcStatusCode UNAVAILABLE
public static final GrpcStatusCode DATA_LOSS
public static final GrpcStatusCode UNAUTHENTICATED
public static GrpcStatusCode[] values()
for (GrpcStatusCode c : GrpcStatusCode.values()) System.out.println(c);
public static GrpcStatusCode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static GrpcStatusCode fromCodeValue(CharSequence codeValue)
codeValue - code value.UNKNOWN.public static GrpcStatusCode fromCodeValue(int codeValue)
codeValue - integer code value.UNKNOWN.public int value()
public GrpcStatus status()
GrpcStatus with this status code.GrpcStatus with this status code.public static GrpcStatusCode fromHttp2ErrorCode(Http2ErrorCode errorCode)
Http2ErrorCode to GrpcStatus.errorCode - the Http2ErrorCode to convert.