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

# Errors

> Learn how to handle errors effectively when interacting with the API

The API uses standard HTTP status codes to indicate the success or failure of a request. Successful requests typically return a `2xx` status code, while client errors return `4xx` codes, and server errors return `5xx` codes. For instance, a `200 OK` indicates a successful response, `400 Bad Request` points to an issue with the input data, and `500 Internal Server Error` signals a problem on the server side.

In case of an error, the API responds with a JSON structure that provides more detailed information. A typical error response might look like this:

```json theme={null}
{
  "error": {
    "status": 400,
    "code": "invalid_payload",
    "title": "Invalid request parameters"
  }
}
```

| Name     | Type             | Description                                                                       |
| -------- | ---------------- | --------------------------------------------------------------------------------- |
| `status` | number           | HTTP status code generated by the origin server for this occurrence of the error  |
| `code`   | string           | An API specific code representing the type of error                               |
| `title`  | string           | A short, human-readable summary of the error type                                 |
| `detail` | string or object | A best effort human readable explanation specific to this occurrence of the error |

By properly handling these error responses, you can ensure your application gracefully recovers from issues or provides useful feedback to the user.

If you're using one of our official SDKs, error handling is made even simpler. The SDKs automatically capture and interpret the API's error responses and provide a convenient, structured way to handle them within your code. This means you can focus more on building your application and less on managing low-level error handling logic.
