1 module grpc.StatusCode; 2 3 enum StatusCode { 4 /// Not an error; returned on success. 5 OK = 0, 6 7 /// The operation was cancelled (typically by the caller). 8 CANCELLED = 1, 9 10 /// Unknown error. An example of where this error may be returned is if a 11 /// Status value received from another address space belongs to an error-space 12 /// that is not known in this address space. Also errors raised by APIs that 13 /// do not return enough error information may be converted to this error. 14 UNKNOWN = 2, 15 16 /// Client specified an invalid argument. Note that this differs from 17 /// FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are 18 /// problematic regardless of the state of the system (e.g., a malformed file 19 /// name). 20 INVALID_ARGUMENT = 3, 21 22 /// Deadline expired before operation could complete. For operations that 23 /// change the state of the system, this error may be returned even if the 24 /// operation has completed successfully. For example, a successful response 25 /// from a server could have been delayed long enough for the deadline to 26 /// expire. 27 DEADLINE_EXCEEDED = 4, 28 29 /// Some requested entity (e.g., file or directory) was not found. 30 NOT_FOUND = 5, 31 32 /// Some entity that we attempted to create (e.g., file or directory) already 33 /// exists. 34 ALREADY_EXISTS = 6, 35 36 /// The caller does not have permission to execute the specified operation. 37 /// PERMISSION_DENIED must not be used for rejections caused by exhausting 38 /// some resource (use RESOURCE_EXHAUSTED instead for those errors). 39 /// PERMISSION_DENIED must not be used if the caller can not be identified 40 /// (use UNAUTHENTICATED instead for those errors). 41 PERMISSION_DENIED = 7, 42 43 /// Some resource has been exhausted, perhaps a per-user quota, or perhaps the 44 /// entire file system is out of space. 45 RESOURCE_EXHAUSTED = 8, 46 47 /// Operation was rejected because the system is not in a state required for 48 /// the operation's execution. For example, directory to be deleted may be 49 /// non-empty, an rmdir operation is applied to a non-directory, etc. 50 /// 51 /// A litmus test that may help a service implementor in deciding 52 /// between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: 53 /// (a) Use UNAVAILABLE if the client can retry just the failing call. 54 /// (b) Use ABORTED if the client should retry at a higher-level 55 /// (e.g., restarting a read-modify-write sequence). 56 /// (c) Use FAILED_PRECONDITION if the client should not retry until 57 /// the system state has been explicitly fixed. E.g., if an "rmdir" 58 /// fails because the directory is non-empty, FAILED_PRECONDITION 59 /// should be returned since the client should not retry unless 60 /// they have first fixed up the directory by deleting files from it. 61 /// (d) Use FAILED_PRECONDITION if the client performs conditional 62 /// REST Get/Update/Delete on a resource and the resource on the 63 /// server does not match the condition. E.g., conflicting 64 /// read-modify-write on the same resource. 65 FAILED_PRECONDITION = 9, 66 67 /// The operation was aborted, typically due to a concurrency issue like 68 /// sequencer check failures, transaction aborts, etc. 69 /// 70 /// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, 71 /// and UNAVAILABLE. 72 ABORTED = 10, 73 74 /// Operation was attempted past the valid range. E.g., seeking or reading 75 /// past end of file. 76 /// 77 /// Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed 78 /// if the system state changes. For example, a 32-bit file system will 79 /// generate INVALID_ARGUMENT if asked to read at an offset that is not in the 80 /// range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from 81 /// an offset past the current file size. 82 /// 83 /// There is a fair bit of overlap between FAILED_PRECONDITION and 84 /// OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error) 85 /// when it applies so that callers who are iterating through a space can 86 /// easily look for an OUT_OF_RANGE error to detect when they are done. 87 OUT_OF_RANGE = 11, 88 89 /// Operation is not implemented or not supported/enabled in this service. 90 UNIMPLEMENTED = 12, 91 92 /// Internal errors. Means some invariants expected by underlying System has 93 /// been broken. If you see one of these errors, Something is very broken. 94 INTERNAL = 13, 95 96 /// The service is currently unavailable. This is a most likely a transient 97 /// condition and may be corrected by retrying with a backoff. 98 /// 99 /// \warning Although data MIGHT not have been transmitted when this 100 /// status occurs, there is NOT A GUARANTEE that the server has not seen 101 /// anything. So in general it is unsafe to retry on this status code 102 /// if the call is non-idempotent. 103 /// 104 /// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, 105 /// and UNAVAILABLE. 106 UNAVAILABLE = 14, 107 108 /// Unrecoverable data loss or corruption. 109 DATA_LOSS = 15, 110 111 /// The request does not have valid authentication credentials for the 112 /// operation. 113 UNAUTHENTICATED = 16, 114 115 /// read data timeout . default expiretime 4s 116 READ_TIME_OUT = 20, 117 118 /// Force users to include a default branch: 119 DO_NOT_USE = -1 120 }