gRPC status codes
YDB provides the gRPC API, which you can use to manage your database resources and data. The following table describes the gRPC status codes:
Code |
Status |
Retryability |
Backoff strategy |
Recreate session |
– |
– |
– |
||
conditionally-retryable |
fast |
yes |
||
non-retryable |
– |
yes |
||
non-retryable |
– |
yes |
||
conditionally-retryable |
fast |
yes |
||
non-retryable |
– |
yes |
||
non-retryable |
– |
yes |
||
non-retryable |
– |
yes |
||
retryable |
slow |
no |
||
non-retryable |
– |
yes |
||
retryable |
instant |
yes |
||
non-retryable |
– |
no |
||
non-retryable |
– |
yes |
||
conditionally-retryable |
fast |
yes |
||
conditionally-retryable |
fast |
yes |
||
non-retryable |
– |
yes |
||
non-retryable |
– |
yes |
0: OK
Not an error; returned on success.
The operation was cancelled, typically by the caller.
Unknown error. For example, this error may be returned when a Status
value received from another address space belongs to an error space that is not known in this address space. Errors raised by APIs that do not return enough error information may also be converted to this error.
The client specified an invalid argument. Unlike FAILED_PRECONDITION
, INVALID_ARGUMENT
indicates arguments that are problematic regardless of the system state (e.g., a malformed file name).
The query was not processed within the specified client timeout, or a network issue occurred.
Check the specified timeout, network access, endpoint, and other network settings. Reduce the query rate and optimize queries.
A requested scheme object (for example, a table or directory) was not found.
The scheme object that a client attempted to create (e.g., file or directory) already exists.
The caller does not have permission to execute the specified operation.
There are not enough resources available to fulfill the query.
Reduce the query rate and check client balancing.
The query cannot be executed in the current state (for example, inserting data into a table with an existing key).
Fix the state or query, then retry.
The operation was aborted, typically due to a concurrency issue, such as a transaction abort.
The operation was attempted past the valid range. Unlike INVALID_ARGUMENT
, this error indicates a problem that may be fixed if the system state changes.
The operation is not implemented, supported, or enabled in this service.
Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for significant problems.
The service is currently unavailable. This is most likely a transient condition that can be corrected by retrying with a backoff. Note that it is not always safe to retry non-idempotent operations.
Unrecoverable data loss or corruption.
The request did not have valid authentication credentials.
Retry the request with valid authentication credentials.
Instant retry is one of the backoff strategies used in YDB SDK when retrying queries that return an error.
This strategy retries queries immediately after receiving an error.
For more information, see Handling retryable errors.
Fast exponential backoff is one of the backoff strategies used in YDB SDK when retrying queries that return an error.
The initial interval for this strategy is several milliseconds. For each subsequent attempt, the interval increases exponentially.
For more information, see Handling retryable errors.
Slow exponential backoff is one of the backoff strategies used by YDB SDK when retrying queries that return an error.
The initial interval for this strategy is several seconds. For each subsequent attempt, the interval increases exponentially.
For more information, see Handling retryable errors.
Temporary failures (retryable). Such errors include a short-term loss of network connectivity, temporary unavailability, overload of a YDB subsystem, or a failure of YDB to respond to a query within the set timeout. If one of these errors occurs, retrying the failed query is likely to be successful after some time.
Errors that cannot be fixed with a retry (non-retryable). Such errors are caused by incorrectly written queries, YDB internal errors, or queries that mismatch the data schema. Retrying such queries will not resolve the issue. This situation requires developer attention.
Errors that can presumably be fixed with a retry after the client application response (conditionally retryable). Such errors include no response within the set timeout or an authentication request. Only idempotent operations can be fixed with a retry.