init(RPCError.Code)
Creates a status code from an Code
.
init?(rawValue: Int)
Creates a status codes from its raw value.
static let aborted: Status.Code
The operation was aborted, typically due to a concurrency issue like sequencer check failures, transaction aborts, etc.
static let all: [Self]
static let alreadyExists: Status.Code
Some entity that we attempted to create (e.g., file or directory) already exists.
static let cancelled: Status.Code
The operation was cancelled (typically by the caller).
static let dataLoss: Status.Code
Unrecoverable data loss or corruption.
static let deadlineExceeded: Status.Code
Deadline expired before operation could complete. For operations that change the state of the system, this error may be returned even if the operation has completed successfully. For example, a successful response from a server could have been delayed long enough for the deadline to expire.
static let failedPrecondition: Status.Code
Operation was rejected because the system is not in a state required for the operation’s execution. For example, directory to be deleted may be non-empty, an rmdir operation is applied to a non-directory, etc.
static let internalError: Status.Code
Internal errors. Means some invariants expected by underlying System has been broken. If you see one of these errors, Something is very broken.
static let invalidArgument: Status.Code
Client specified an invalid argument. Note that this differs from failedPrecondition
. invalidArgument
indicates arguments that are problematic regardless of the state of the system (e.g., a malformed file name).
static let notFound: Status.Code
Some requested entity (e.g., file or directory) was not found.
static let ok: Status.Code
The operation completed successfully.
static let outOfRange: Status.Code
Operation was attempted past the valid range. E.g., seeking or reading past end of file.
static let resourceExhausted: Status.Code
Some resource has been exhausted, perhaps a per-user quota, or perhaps the entire file system is out of space.
static let unauthenticated: Status.Code
The request does not have valid authentication credentials for the operation.
static let unavailable: Status.Code
The service is currently unavailable. This is a most likely a transient condition and may be corrected by retrying with a backoff.
static let unimplemented: Status.Code
Operation is not implemented or not supported/enabled in this service.
static let unknown: Status.Code
Unknown error. An example of where this error may be returned is if a Status value received from another address space belongs to an error-space that is not known in this address space. Also errors raised by APIs that do not return enough error information may be converted to this error.