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

# Errors

> Understand how Lead handles errors and error messages.

Lead uses HTTP response codes to indicate the success or failure of an API request.

* Codes in the 2xx range indicate success
* Codes in 4xx and 5xx range indicate an error
  * 4xx errors indicate a bad request and are fixable using the information in the error message.
  * 5xx errors indicate an issue with Lead's servers, (this is rare).

Lead's error responses conform to [RFC 7807](https://datatracker.ietf.org/doc/html/rfc7807).

Error responses will follow this shape:

```json theme={null}
{  
    "type": "string",  
    "status": "string",  
    "title": "string",  
    "detail": "string",  
    "code": "string",  
}
```

| **Field** | **Description**                                                                                                                                                                             |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| type      | The primary classification of the error.                                                                                                                                                    |
| code      | A machine-readable string that represents the specific error encountered.                                                                                                                   |
| title     | A human-readable string explaining the error. This is meant to be read by a developer, not a machine. The message will change and should not be used programmatically. For that use `code`. |
| detail    | A human-readable explanation specific to THIS occurrence of the problem.                                                                                                                    |
| status    | The HTTP status code of the error.                                                                                                                                                          |
