Docs / Errors
Errors
Every error has the same body. code is stable and safe to branch on; message says what to do instead; details depends on the code.
{
"error": {
"code": "jurisdiction_not_found",
"message": "no jurisdiction 'us-washington'; find slugs with GET /v1/jurisdictions?q=<name>",
"docs_url": "https://juriset.dev/docs/errors#jurisdiction_not_found",
"details": {
"suggestions": [
"us-wa"
]
}
}
}The same fields are repeated at the top level, with status and status_page, for clients written against the first version of the API. Errors are sent with Cache-Control: no-store. Which endpoint returns which code is in the API reference.
| Code | Status | Meaning and what to do |
|---|---|---|
http_error | 400 | Another HTTP-level error; |
invalid_api_key | 401 | The header is not |
missing_api_key | 401 | This needs an API key: send |
revoked_api_key | 401 | The key was revoked ( |
plan_required | 403 | The caller's plan does not include this feature ( |
read_only_key | 403 | A read-only key (the site's own) tried to write. |
domain_not_found | 404 | Unknown domain; |
jurisdiction_not_covered | 404 | Juriset does not cover this rule type in this jurisdiction (for example a city). |
jurisdiction_not_found | 404 | Unknown jurisdiction slug; |
not_covered_for_date | 404 |
|
not_found | 404 | No such endpoint. The routes are listed at |
rule_type_not_found | 404 | Unknown rule type; |
snapshot_not_found | 404 | No stored snapshot with that id is cited by a published version; use a |
version_not_found | 404 | No published version has this id or number. Version ids look like |
method_not_allowed | 405 | The endpoint exists but not with this HTTP method. |
nothing_published | 409 | Nothing is published for this rule yet, so there is no value to report on. |
invalid_parameter | 422 | A parameter or body field is malformed; |
quota_exceeded | 429 | This month's lookups are used: the plan's included lookups. |
rate_limited | 429 | More requests than the plan allows: per second for a key, per hour or per day for keyless callers. Wait |
too_many_reports | 429 | More than 20 issue reports from this key today (UTC). |
internal_error | 500 | Something failed on our side; it has been reported. Retry later, and see the status page if it persists. |
overloaded | 503 | Juriset is answering more requests than it can at this moment. Retry after |
snapshots_unavailable | 503 | Snapshot storage cannot be reached here. Retry later; the citation's |