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

# REST API errors

> HTTP error codes returned by the Autheo Chain REST API and how to handle them.

## HTTP status codes

| Code                        | Meaning            | Common cause                                                            |
| --------------------------- | ------------------ | ----------------------------------------------------------------------- |
| `200 OK`                    | Success            | Request completed successfully                                          |
| `400 Bad Request`           | Invalid parameters | Malformed address, invalid block number, or missing required parameter  |
| `404 Not Found`             | Resource not found | Address has no data, block doesn't exist, or transaction hash not found |
| `422 Unprocessable Entity`  | Validation error   | Parameter value is out of range or wrong type                           |
| `429 Too Many Requests`     | Rate limited       | Too many requests in a short period                                     |
| `500 Internal Server Error` | Server error       | Retry with backoff                                                      |

## Error response format

All error responses return a JSON body with a `message` field:

```json theme={null}
{
  "message": "Not found"
}
```

## Common errors

### 400 — Invalid address format

```json theme={null}
{"message": "Invalid address hash"}
```

**Fix**: Ensure the address is a valid EIP-55 checksummed hex address (`0x...`, 40 hex characters). Use `ethers.getAddress(address)` to checksum an address.

***

### 404 — Address or transaction not found

```json theme={null}
{"message": "Not found"}
```

**Fix**: The address may have no on-chain activity, or the transaction hash may be incorrect. Verify on the [block explorer](https://evm-explorer.autheo.com/).

***

### 429 — Rate limited

**Fix**: Reduce request frequency and implement exponential backoff. See [JSON-RPC rate limits](/apis/json-rpc/rate-limits) for backoff strategies — the same approach applies to REST requests.

## Example error handling in JavaScript

```javascript theme={null}
async function apiRequest(path) {
  const response = await fetch(`https://evm-explorer.autheo.com/api/v2${path}`);

  if (!response.ok) {
    const error = await response.json().catch(() => ({ message: "Unknown error" }));
    throw new Error(`API error ${response.status}: ${error.message}`);
  }

  return response.json();
}

try {
  const data = await apiRequest("/addresses/0x<address>");
  console.log(data);
} catch (err) {
  console.error(err.message);
}
```
