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

# Errors

> Standard error codes and handling

## Error format

All errors return a consistent JSON structure:

```json theme={null}
{
  "error": "Unauthorized",
  "message": "Invalid or missing API key",
  "status": 401
}
```

## Status codes

| Code | Name | Description |
| - | - | - |
| `200` | OK | Request successful |
| `400` | Bad Request | Invalid parameters |
| `401` | Unauthorized | Missing or invalid API key |
| `404` | Not Found | Resource not found |
| `429` | Too Many Requests | Rate limit exceeded |
| `500` | Internal Server Error | Server-side error |
| `503` | Service Unavailable | Temporary maintenance |

## Handling errors

```javascript Node.js theme={null}
try {
  const response = await fetch('https://api.fieldfunded.com/v1/events', {
    headers: { 'X-API-Key': 'YOUR_API_KEY' }
  });
  
  if (!response.ok) {
    const error = await response.json();
    console.error(`Error ${error.status}: ${error.message}`);
    return;
  }
  
  const data = await response.json();
} catch (err) {
  console.error('Network error:', err);
}
```

```python Python theme={null}
import requests

response = requests.get(
    'https://api.fieldfunded.com/v1/events',
    headers={'X-API-Key': 'YOUR_API_KEY'}
)

if response.status_code != 200:
    error = response.json()
    print(f"Error {error['status']}: {error['message']}")
else:
    data = response.json()
```

> [card] [Quick Start Guide](https://docs.fieldfunded.com/quickstart.md)
>
> Get started with error handling best practices

> [card] [SDK Reference](https://docs.fieldfunded.com/sdk.md)
>
> SDK handles errors and retries automatically

> [card] [Authentication](https://docs.fieldfunded.com/authentication.md)
>
> Fix 401 errors — API key setup guide

> [card] [Rate Limits](https://docs.fieldfunded.com/rate-limits.md)
>
> Fix 429 errors — understand your quota


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.