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

# Error Handling

> Understanding API errors and how to handle them

All endpoints return standard HTTP status codes:

* `200 OK`: Request successful
* `400 Bad Request`: Invalid request parameters or body
* `401 Unauthorized`: Missing or invalid API key
* `404 Not Found`: Resource not found
* `500 Internal Server Error`: Server error

## Error Response Format

Error responses follow this format:

```
{
  "error": [
    {
      "message": "Error message description",
      "path": "field.path"
    }
  ]
}
```

## Common Error Scenarios

### Missing API Key

```
{
  "error": "API key is required"
}
```

### Invalid Parameters

```
{
  "error": [
    {
      "message": "At least 3 and at most 10 keywords are required",
      "path": "keywords"
    }
  ]
}
```

### Invalid Callback URL

```
{
  "error": [
    {
      "message": "Callback URL must be a valid HTTPS URL",
      "path": "callbackUrl"
    }
  ]
}
```

### Insufficient Credits

```
{
  "error": "Insufficient credits"
}
```

This error occurs when creating a job and you don't have enough credits in the appropriate tier (Pro credits for enriched searches, Basic credits for non-enriched searches, or Private Key credits when `scraperKey` is provided).

### Invalid Firecrawl Scraper API Key

```
{
  "error": "Invalid Firecrawl Scraper API key"
}
```

This error occurs when you provide `scraperKey` but the Firecrawl key is invalid.

### Firecrawl Account Has Less Than 50 Remaining Credits

```
{
  "error": "Firecrawl account has less than 50 remaining credits"
}
```

This error occurs when you provide `scraperKey` but the associated Firecrawl account has fewer than 50 remaining credits.
