---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ydb.tech/docs/en/reference/ydb-sdk/grpc-status-codes.md?version=v26.1
  - https://ydb.tech/docs/ru/reference/ydb-sdk/grpc-status-codes.md?version=v26.1
  - href: en/reference/ydb-sdk/grpc-status-codes.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
sourcePath: en/core/reference/ydb-sdk/grpc-status-codes.md
---
> **Documentation Index:** Fetch the complete configuration index at https://ydb.tech/docs/en/llms.txt

# 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
||

||
[0](#ok)
|
[OK](#ok)
|
–
|
–
|
–
||

||
[1](#cancelled)
|
[CANCELLED](#cancelled)
|
[conditionally-retryable](*condretryable)
|
[fast](*fastbackoff)
|
yes
||

||
[2](#unknown)
|
[UNKNOWN](#unknown)
|
[non-retryable](*nonretryable)
|
–
|
yes
||

||
[3](#invalid-argument)
|
[INVALID_ARGUMENT](#invalid-argument)
|
[non-retryable](*nonretryable)
|
–
|
yes
||

||
[4](#deadline-exceeded)
|
[DEADLINE_EXCEEDED](#deadline-exceeded)
|
[conditionally-retryable](*condretryable)
|
[fast](*fastbackoff)
|
yes
||

||
[5](#not-found)
|
[NOT_FOUND](#not-found)
|
[non-retryable](*nonretryable)
|
–
|
yes
||

||
[6](#already-exists)
|
[ALREADY_EXISTS](#already-exists)
|
[non-retryable](*nonretryable)
|
–
|
yes
||

||
[7](#permission-denied)
|
[PERMISSION_DENIED](#permission-denied)
|
[non-retryable](*nonretryable)
|
–
|
yes
||

||
[8](#resource-exhausted)
|
[RESOURCE_EXHAUSTED](#resource-exhausted)
|
[retryable](*retryable)
|
[slow](*slowbackoff)
|
no
||

||
[9](#failed-precondition)
|
[FAILED_PRECONDITION](#failed-precondition)
|
[non-retryable](*nonretryable)
|
–
|
yes
||

||
[10](#aborted)
|
[ABORTED](#aborted)
|
[retryable](*retryable)
|
[instant](*instant)
|
yes
||

||
[11](#out-of-range)
|
[OUT_OF_RANGE](#out-of-range)
|
[non-retryable](*nonretryable)
|
–
|
no
||

||
[12](#unimplemented)
|
[UNIMPLEMENTED](#unimplemented)
|
[non-retryable](*nonretryable)
|
–
|
yes
||

||
[13](#internal)
|
[INTERNAL](#internal)
|
[conditionally-retryable](*condretryable)
|
[fast](*fastbackoff)
|
yes
||

||
[14](#unavailable)
|
[UNAVAILABLE](#unavailable)
|
[conditionally-retryable](*condretryable)
|
[fast](*fastbackoff)
|
yes
||

||
[15](#data-loss)
|
[DATA_LOSS](#data-loss)
|
[non-retryable](*nonretryable)
|
–
|
yes
||

||
[16](#unauthenticated)
|
[UNAUTHENTICATED](#unauthenticated)
|
[non-retryable](*nonretryable)
|
–
|
yes
||
|#

## 0: OK {#ok}

Not an error; returned on success.

<div class="tags_list">

## 1: CANCELLED {#cancelled}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "use_cases-tag tags-shape tags-color-text"> [Conditionally retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) | Fast Backoff </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

The operation was cancelled, typically by the caller.

<div class="tags_list">

## 2: UNKNOWN {#unknown}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "overview-tag tags-shape tags-color-text"> [Non-retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

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.

<div class="tags_list">

## 3: INVALID_ARGUMENT {#invalid-argument}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "overview-tag tags-shape tags-color-text"> [Non-retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

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).

<div class="tags_list">

## 4: DEADLINE_EXCEEDED {#deadline-exceeded}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "use_cases-tag tags-shape tags-color-text"> [Conditionally retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) | Fast Backoff </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

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.

<div class="tags_list">

## 5: NOT_FOUND {#not-found}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "overview-tag tags-shape tags-color-text"> [Non-retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

A requested scheme object (for example, a table or directory) was not found.

<div class="tags_list">

## 6: ALREADY_EXISTS {#already-exists}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "overview-tag tags-shape tags-color-text"> [Non-retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

The scheme object that a client attempted to create (e.g., file or directory) already exists.

<div class="tags_list">

## 7: PERMISSION_DENIED {#permission-denied}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "overview-tag tags-shape tags-color-text"> [Non-retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

The caller does not have permission to execute the specified operation.

<div class="tags_list">

## 8: RESOURCE_EXHAUSTED {#resource-exhausted}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "practice-tag tags-shape tags-color-text"> [Retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) | Slow Backoff </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

There are not enough resources available to fulfill the query.

Reduce the query rate and check client balancing.

<div class="tags_list">

## 9: FAILED_PRECONDITION {#failed-precondition}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "overview-tag tags-shape tags-color-text"> [Non-retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

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.

<div class="tags_list">

## 10: ABORTED {#aborted}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "practice-tag tags-shape tags-color-text"> [Retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) | Instant </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

The operation was aborted, typically due to a concurrency issue, such as a transaction abort.

<div class="tags_list">

## 11: OUT_OF_RANGE {#out-of-range}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "overview-tag tags-shape tags-color-text"> [Non-retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

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.

<div class="tags_list">

## 12: UNIMPLEMENTED {#unimplemented}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "overview-tag tags-shape tags-color-text"> [Non-retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

The operation is not implemented, supported, or enabled in this service.

<div class="tags_list">

## 13: INTERNAL {#internal}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "use_cases-tag tags-shape tags-color-text"> [Conditionally retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) | Fast Backoff </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

Internal errors. This means that some invariants expected by the underlying system have been broken. This error code is reserved for significant problems.

<div class="tags_list">

## 14: UNAVAILABLE {#unavailable}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "use_cases-tag tags-shape tags-color-text"> [Conditionally retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) | Fast Backoff </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

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.

<div class="tags_list">

## 15: DATA_LOSS {#data-loss}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "overview-tag tags-shape tags-color-text"> [Non-retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

Unrecoverable data loss or corruption.

<div class="tags_list">

## 16: UNAUTHENTICATED {#unauthenticated}

<!-- source: en/reference/ydb-sdk/_includes/tags.md -->
 <span class = "overview-tag tags-shape tags-color-text"> [Non-retryable](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1) </span>
<!-- endsource: en/reference/ydb-sdk/_includes/tags.md -->

</div>

The request did not have valid authentication credentials.

Retry the request with valid authentication credentials.

[*instant]: **Instant retry** is one of the backoff strategies used in YDB SDK when retrying queries that return an error.<br/>
This strategy retries queries immediately after receiving an error.<br/>
For more information, see [Handling retryable errors](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1#handling-retryable-errors).

[*fastbackoff]: **Fast exponential backoff** is one of the backoff strategies used in YDB SDK when retrying queries that return an error.<br/>
The initial interval for this strategy is several **milliseconds**. For each subsequent attempt, the interval increases exponentially.<br/>
For more information, see [Handling retryable errors](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1#handling-retryable-errors).

[*slowbackoff]: **Slow exponential backoff** is one of the backoff strategies used by YDB SDK when retrying queries that return an error.<br/>
The initial interval for this strategy is several **seconds**. For each subsequent attempt, the interval increases exponentially.<br/>
For more information, see [Handling retryable errors](https://ydb.tech/docs/en/reference/ydb-sdk/error_handling.md?version=v26.1#handling-retryable-errors).

[*retryable]: **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.

[*nonretryable]: **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.

[*condretryable]: **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.