MCPcopy Create free account
hub / github.com/grpc/grpc-java / Status

Class Status

api/src/main/java/io/grpc/Status.java:57–672  ·  view source on GitHub ↗

Defines the status of an operation by providing a standard Code in conjunction with an optional descriptive message. Instances of Status are created by starting with the template for the appropriate Status.Code and supplementing it with additional information: {@code Status.N

Source from the content-addressed store, hash-verified

55 * <a href="https://github.com/grpc/grpc/blob/master/doc/statuscodes.md">doc/statuscodes.md</a>
56 */
57@Immutable
58@CheckReturnValue
59public final class Status {
60
61 /**
62 * The set of canonical status codes. If new codes are added over time they must choose
63 * a numerical value that does not collide with any previously used value.
64 */
65 public enum Code {
66 /**
67 * The operation completed successfully.
68 */
69 OK(0),
70
71 /**
72 * The operation was cancelled (typically by the caller).
73 */
74 CANCELLED(1),
75
76 /**
77 * Unknown error. An example of where this error may be returned is
78 * if a Status value received from another address space belongs to
79 * an error-space that is not known in this address space. Also
80 * errors raised by APIs that do not return enough error information
81 * may be converted to this error.
82 */
83 UNKNOWN(2),
84
85 /**
86 * Client specified an invalid argument. Note that this differs
87 * from FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments
88 * that are problematic regardless of the state of the system
89 * (e.g., a malformed file name).
90 */
91 INVALID_ARGUMENT(3),
92
93 /**
94 * Deadline expired before operation could complete. For operations
95 * that change the state of the system, this error may be returned
96 * even if the operation has completed successfully. For example, a
97 * successful response from a server could have been delayed long
98 * enough for the deadline to expire.
99 */
100 DEADLINE_EXCEEDED(4),
101
102 /**
103 * Some requested entity (e.g., file or directory) was not found.
104 */
105 NOT_FOUND(5),
106
107 /**
108 * Some entity that we attempted to create (e.g., file or directory) already exists.
109 */
110 ALREADY_EXISTS(6),
111
112 /**
113 * The caller does not have permission to execute the specified
114 * operation. PERMISSION_DENIED must not be used for rejections

Callers

nothing calls this directly

Calls 3

buildStatusListMethod · 0.95
toStatusMethod · 0.45
ofMethod · 0.45

Tested by

no test coverage detected