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

# Error Handling

Our API uses standard HTTP response codes to indicate the success or failure of a request. Errors will be returned with a JSON body containing more details.

## Error Format

```json theme={null}
{
  "code": "INVALID_INPUT",
  "message": "amount must be greater than 0"
}
```

## Common Errors

<CardGroup>
  <Card title="UNAUTHORIZED">
    **Meaning**: Invalid API key provided. <br />
    **Action**: Check that your `SECURELEND_API_KEY` environment variable is correct.
  </Card>

  <Card title="NO_OFFERS">
    **Meaning**: No lenders matched the provided criteria. <br />
    **Action**: Try adjusting the loan amount or other criteria.
  </Card>

  <Card title="INVALID_INPUT">
    **Meaning**: One or more request parameters were invalid. <br />
    **Action**: Check the `message` field for details on the specific error.
  </Card>
</CardGroup>

## Retry vs. No-Retry

* **Retry**: Network errors or `5xx` server errors can generally be retried. We recommend an exponential backoff strategy.
* **Do Not Retry**: `4xx` client errors (like `INVALID_INPUT` or `UNAUTHORIZED`) should not be retried without first correcting the underlying issue in your request.
