# Errors

> Every exception the SDK raises.

Source: https://docs.stxapp.io/sdks/python/reference/errors/

{/* Generated from the Python source by tools/gen_reference.py. Do not edit by hand. */}

Every exception extends `STXException`.

| Exception | Extends | When |
|---|---|---|
| [`STXException`](#stxexception) | `Exception` | Base for every error the SDK raises. |
| [`STXConfigException`](#stxconfigexception) | `STXException` | The client is misconfigured: unknown region, missing key, bad PEM. |
| [`STXAPIException`](#stxapiexception) | `STXException` | The API answered with an error status. Base for the classes below. |
| [`STXValidationException`](#stxvalidationexception) | `STXAPIException` | 400: a parameter or body field was rejected, e.g. `price is required`. |
| [`STXAuthenticationException`](#stxauthenticationexception) | `STXAPIException` | 401: the signature, key id or timestamp was not accepted. |
| [`STXForbiddenException`](#stxforbiddenexception) | `STXAPIException` | 403: the key is read-only, or the account may not do this. |
| [`STXNotFoundException`](#stxnotfoundexception) | `STXAPIException` | 404: the resource does not exist, or belongs to another account. |
| [`STXRejectedException`](#stxrejectedexception) | `STXAPIException` | 422: the exchange refused the request, e.g. insufficient funds or a closed market. |
| [`STXRateLimitException`](#stxratelimitexception) | `STXAPIException` | 429: too many requests. `retry_after` is seconds, when sent. |
| [`STXServerException`](#stxserverexception) | `STXAPIException` | 5xx: the server failed. Retried by the default policy. |
| [`STXTransportException`](#stxtransportexception) | `STXException` | The request never got an answer: connection, DNS, TLS or timeout. |
| [`STXChannelException`](#stxchannelexception) | `STXException` | A channel join or channel message was refused by the server. |

## `STXException`

Base for every error the SDK raises.

## `STXConfigException`

The client is misconfigured: unknown region, missing key, bad PEM.

## `STXAPIException`

The API answered with an error status. Base for the classes below.

## `STXValidationException`

400: a parameter or body field was rejected, e.g. `price is required`.

## `STXAuthenticationException`

401: the signature, key id or timestamp was not accepted.

A machine clock more than 30 seconds off also lands here.

## `STXForbiddenException`

403: the key is read-only, or the account may not do this.

## `STXNotFoundException`

404: the resource does not exist, or belongs to another account.

## `STXRejectedException`

422: the exchange refused the request, e.g. insufficient funds or a
closed market.

## `STXRateLimitException`

429: too many requests. `retry_after` is seconds, when sent.

## `STXServerException`

5xx: the server failed. Retried by the default policy.

## `STXTransportException`

The request never got an answer: connection, DNS, TLS or timeout.

## `STXChannelException`

A channel join or channel message was refused by the server.

`reply` holds the server's `response` object, for example
`{"reason": "unauthorized"}`.
