> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.trychora.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.trychora.com/_mcp/server.

# Errors

Every error response uses the same envelope:

```json
{
  "error": {
    "type": "invalid_request",
    "code": "invalid_coord",
    "message": "lat and lng must be finite numbers.",
    "docs_url": "https://wildlife-dev.docs.buildwithfern.com/guides/errors#invalid_coord",
    "request_id": "req_a1b2c3d4e5"
  }
}
```

## Error types

| Type                    | HTTP | When                                                                                     |
| ----------------------- | ---- | ---------------------------------------------------------------------------------------- |
| `invalid_request`       | 400  | Missing or malformed query parameter.                                                    |
| `authentication_error`  | 401  | Missing or invalid API key.                                                              |
| `permission_error`      | 403  | Key doesn't have access to the resource.                                                 |
| `rate_limit_error`      | 429  | You exceeded your rate limit. See [Rate limits](/technical-concepts/rate-limits).        |
| `source_upstream_error` | 502  | An upstream data source is unreachable. Retry with backoff.                              |
| `internal_error`        | 500  | Something on our side. Please [report](mailto:hello@trychora.com) with the `request_id`. |

## Common error codes

| Code                  | Meaning                                                                |
| --------------------- | ---------------------------------------------------------------------- |
| `missing_api_key`     | No `Authorization: Bearer ...` header.                                 |
| `invalid_api_key`     | Bearer token not in our allowlist.                                     |
| `invalid_coord`       | `lat` must be `[-90, 90]`, `lng` must be `[-180, 180]`.                |
| `invalid_date_range`  | `start` / `end` must be `YYYY-MM-DD` and `end >= start`.               |
| `date_range_too_long` | Stay window exceeds the maximum supported horizon (currently 90 days). |
| `rate_limited`        | Slow down. See `Retry-After` header.                                   |
| `route_not_found`     | The path doesn't match any endpoint.                                   |

## `applicable: false` is not an error

If a Chora endpoint can't produce meaningful data for a coord —
marine data on an inland property, snow data on a Mediterranean
property, MICHELIN in a region we don't yet cover — the response
comes back `200 OK` with `applicable: false` and an empty payload.

Callers should hide the section rather than treat this as an error.
It's how the API tells you "there's genuinely nothing to show here."

## Partial responses

When one contributing upstream fails during a widget render, the
response comes back `200` with `meta.partial: true`. The successful
sections render normally; the failed section is dropped rather than
blocking the whole widget.

## Request IDs

Every error carries a `request_id` (also present in successful
responses under `meta.request_id`). Include it in any support
request — we can trace the full call path from that alone.