Status codes from the YDB server
- 400000: SUCCESS
- 400010: BAD_REQUEST
- 400020: UNAUTHORIZED
- 400030: INTERNAL_ERROR
- 400040: ABORTED
- 400050: UNAVAILABLE
- 400060: OVERLOADED
- 400070: SCHEME_ERROR
- 400080: GENERIC_ERROR
- 400090: TIMEOUT
- 400100: BAD_SESSION
- 400120: PRECONDITION_FAILED
- 400130: ALREADY_EXISTS
- 400140: NOT_FOUND
- 400150: SESSION_EXPIRED
- 400160: CANCELLED
- 400170: UNDETERMINED
- 400180: UNSUPPORTED
- 400190: SESSION_BUSY
- 400200: EXTERNAL_ERROR
- See also
Code |
Status |
Retryability |
Backoff strategy |
Recreate session |
– |
– |
– |
||
non-retryable |
– |
no |
||
non-retryable |
– |
no |
||
non-retryable |
– |
no |
||
retryable |
fast |
no |
||
retryable |
fast |
no |
||
retryable |
slow |
no |
||
non-retryable |
– |
no |
||
non-retryable |
– |
no |
||
non-retryable |
– |
no |
||
retryable |
instant |
yes |
||
non-retryable |
– |
no |
||
non-retryable |
– |
no |
||
non-retryable |
– |
no |
||
retryable |
instant |
yes |
||
non-retryable |
– |
no |
||
conditionally-retryable |
fast |
no |
||
non-retryable |
– |
no |
||
retryable |
fast |
yes |
||
non-retryable |
– |
no |
400000: SUCCESS
The query was processed successfully.
No response is required. Continue application execution.
Invalid query syntax or missing required fields.
Correct the query.
Access to the requested schema object (for example, a table or directory) is denied.
Request access from its owner.
An unknown internal error occurred.
File a GitHub issue or contact YDB technical support.
The operation was aborted. Possible reasons might include lock invalidation with TRANSACTION_LOCKS_INVALIDATED
in detailed error messages.
Retry the entire transaction.
A part of the system is not available.
Retry the last action (query).
A part of the system is overloaded.
Retry the last action (query) and reduce the query rate.
The query does not match the schema.
Correct the query or schema.
An unclassified error occurred, possibly related to the query.
See the detailed error message. If necessary, file a GitHub issue or contact YDB technical support.
The query timeout expired.
If the query is idempotent, retry it.
This session is no longer available.
Create a new session.
The query cannot be executed in the current state. For example, inserting data into a table with an existing key.
Correct the state or query, then retry.
The database object being created already exists in the YDB cluster.
The response depends on the application logic.
The database object was not found in the YDB database.
The response depends on the application logic.
The session has already expired.
Create a new session.
The request was canceled on the server. For example, a user canceled a long-running query in the Embedded UI, or the query included the cancel_after timeout option.
If the query took too long to complete, try optimizing it. If you used the cancel_after
timeout option, increase the timeout value.
An unknown transaction status. The query ended with a failure, making it impossible to determine the transaction status. Queries that terminate with this status are subject to transaction integrity and atomicity guarantees. That is, either all changes are registered, or the entire transaction is canceled.
For idempotent transactions, retry the entire transaction after a short delay. Otherwise, the response depends on the application logic.
The query is not supported by YDB either because support for such queries is not yet implemented or is not enabled in the YDB configuration.
Correct the query or enable support for such queries in YDB.
The session is busy.
Create a new session.
An error occurred in an external system, for example, when processing a federated query or importing data from an external data source.
See the detailed error message. If necessary, file a GitHub issue or contact YDB technical support.
See also
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.