Errors

Structured error envelopes with request IDs for support.

Every error response uses the same envelope:

{
"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

TypeHTTPWhen
invalid_request400Missing or malformed query parameter.
authentication_error401Missing or invalid API key.
permission_error403Key doesn’t have access to the resource.
rate_limit_error429You exceeded your rate limit. See Rate limits.
source_upstream_error502An upstream data source is unreachable. Retry with backoff.
internal_error500Something on our side. Please report with the request_id.

Common error codes

CodeMeaning
missing_api_keyNo Authorization: Bearer ... header.
invalid_api_keyBearer token not in our allowlist.
invalid_coordlat must be [-90, 90], lng must be [-180, 180].
invalid_date_rangestart / end must be YYYY-MM-DD and end >= start.
date_range_too_longStay window exceeds the maximum supported horizon (currently 90 days).
rate_limitedSlow down. See Retry-After header.
route_not_foundThe 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.