Skip to main content
Version: 11.x

Variable: TRPC_ERROR_CODES_BY_KEY

const TRPC_ERROR_CODES_BY_KEY: object

JSON-RPC 2.0 Error codes

-32000 to -32099 are reserved for implementation-defined server-errors. For tRPC we're copying the last digits of HTTP 4XX errors.

Type declaration

BAD_REQUEST

readonly BAD_REQUEST: -32600

The JSON sent is not a valid Request object.


CLIENT_CLOSED_REQUEST

readonly CLIENT_CLOSED_REQUEST: -32099


CONFLICT

readonly CONFLICT: -32009


FORBIDDEN

readonly FORBIDDEN: -32003


INTERNAL_SERVER_ERROR

readonly INTERNAL_SERVER_ERROR: -32603


METHOD_NOT_SUPPORTED

readonly METHOD_NOT_SUPPORTED: -32005


NOT_FOUND

readonly NOT_FOUND: -32004


NOT_IMPLEMENTED

readonly NOT_IMPLEMENTED: -32603


PARSE_ERROR

readonly PARSE_ERROR: -32700

Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text.


PAYLOAD_TOO_LARGE

readonly PAYLOAD_TOO_LARGE: -32013


PRECONDITION_FAILED

readonly PRECONDITION_FAILED: -32012


TIMEOUT

readonly TIMEOUT: -32008


TOO_MANY_REQUESTS

readonly TOO_MANY_REQUESTS: -32029


UNAUTHORIZED

readonly UNAUTHORIZED: -32001


UNPROCESSABLE_CONTENT

readonly UNPROCESSABLE_CONTENT: -32022

Source

packages/core/dist/rpc/codes.d.ts:7


Generated using TypeDoc and typedoc-plugin-markdown