detail
object. The body shape is consistent:
X-Request-ID. You can
also send your own X-Request-ID request header — the server echoes it
and binds it to its log lines, which is the reliable way to correlate
even the responses that lack the header.
Error code reference
Authentication and account-route failures (401
auth_*, 403, 429
rate_limited) use the same detail shape — the full table lives on the
Authentication page.
Unhandled server exceptions return a plain 500 Internal Server Error
(no structured detail body, and no X-Request-ID response header —
the framework default, since the error bypasses the header middleware).
The server-side log line still carries the request ID, so send your own
X-Request-ID request header if you need to correlate a 500.
Worked examples
The validation examples below need a valid token — authentication runs before request validation, so an unauthenticated call returns401 auth_missing rather than the 400s shown.
coord_out_of_bounds
no_fields_requested
fields_unknown
elevation_m→elevation(no unit suffix).slope→slope_degrees(unit suffix required to disambiguate fromaspect_degrees).floodplain→within_floodplain_polygon(full predicate name).power_plant→nearest_power_plant_name(or…_distance_m,…_primary_fuel, …).
fields_too_many
Pydantic validation errors (FastAPI default)
If the request body fails schema validation (e.g. missinglat, wrong
type), FastAPI’s default 422 response shape applies:
loc path
tells you which field needs fixing.
What is NOT an error
- Partial source failures in
/v1/fetchare 200 OK with a populatedpartial_failuresarray. Failed sources never cause a non-200 response. This is the honesty pattern. - Low-confidence
/v1/askanswers are 200 OK withconfidence: "low". We still return the answer the synthesizer wrote; the confidence bucket tells the caller how much to trust it.
Reporting issues
If you hit an unexplained500, please include:
- Your
X-Request-IDrequest header value if you set one (plain 500s don’t echo it back, but the server log line has it). - The request body (sanitized).
- Approximate timestamp (UTC) and endpoint.