Skip to content

Errors

Errors are RFC 9457 problem+json:

{
"type": "https://api.close.city/problems/invalid-mode",
"title": "Unknown mode 'drive'.",
"status": 400,
"detail": "Valid modes: bike, transit, walk."
}

The stable, machine-readable key is the last path segment of type (the slug, e.g. tokens-exhausted). Match on it, not on the human title.

Status Slugs
400 invalid-parameters, invalid-mode, invalid-type, invalid-cursor, invalid-geometry, invalid-bbox, missing-location, missing-area, polygon-too-complex
401 missing-key, invalid-key
403 account-disabled
404 block-not-found, poi-not-found, place-not-found, point-not-covered, no-isochrone-data, direction-not-available
429 rate-limited (with Retry-After), tokens-exhausted
503 debit-unavailable, store-unavailable (not charged, so retry; may carry Retry-After)

Validation errors (400 invalid-parameters) also carry an errors array naming the offending fields. The Python and R SDKs map each slug to a typed exception / condition.