> For the complete documentation index, see [llms.txt](https://developers.swish.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.swish.app/swish-api/errors.md).

# Errors

Swish uses conventional [HTTP response status codes](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status) to indicate the success or failure of an API request. As a general rule:

* Status codes in the **`2xx`** range indicate success.
* Status codes in the **`4xx`** range indicate incorrect or incomplete parameters (e.g. a required parameter was omitted).
* Status codes in the **`5xx`** range indicate an error with Swish's servers.

Swish also outputs an error response formatted in JSON:

```json
{
  "error": {
    "message": "Item with ID 123 not found.",​
    "error": "Not Found",
    "statusCode": 404,​
    "requestId": "123e4567-e89b-12d3-a456-426614174000"
  }
}
```
