> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qwoty.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Error handling

> Learn how to handle errors when using Qwoty’s API.

The Qwoty API uses conventional HTTP response codes to indicate the success or failure of an API request. This page details how to handle errors effectively and what to expect in error responses.

## HTTP Status Codes

The API uses standard HTTP status codes to indicate the success or failure of requests:

* **2xx Success:** The request was successful
* **4xx Client Error:** The request was invalid or cannot be processed
* **5xx Server Error:** An internal server error occurred

## Error Response Format

When an error occurs, the API returns a JSON response with a `message` property containing a human-readable description of the error:

```json theme={null}
{
  "message": "The requested resource was not found"
}
```

## Common Error Codes

### 400 Bad Request

The request was malformed or contains invalid parameters.

Example:

```json theme={null}
{
  "message": "Cannot assign a subscription to a customer without a currency set"
}
```

### 401 Unauthorized

The request lacks valid authentication credentials.

Example:

```json theme={null}
{
  "message": "Missing authentication token"
}
```

### 404 Not Found

The requested resource was not found.

Example:

```json theme={null}
{
  "message": "Product not found"
}
```

### 429 Too Many Requests

The request rate limit has been exceeded. See **Rate limiting** for more details.

## Getting Help

If you encounter an error that you cannot resolve, please:

1. Check the error message for guidance
2. Verify your request format and parameters
3. Ensure your authentication credentials are valid
4. Contact our support team with the error details and request
