Skip to main content

Errors

All errors follow a consistent envelope format.

Error response shape

{
  "error": {
    "code": "not_found",
    "message": "Signal 'sig_xyz' not found",
    "status": 404
  }
}
FieldTypeDescription
codestringMachine-readable error code
messagestringHuman-readable description
statusintegerHTTP status code

Error codes

StatusCodeDescription
400bad_requestInvalid request parameters
400missing_required_filterSignals list requires entity, theme, or q
401unauthorizedInvalid or missing API key
403forbiddenInsufficient permissions
404not_foundResource not found
409conflictResource already exists (e.g. duplicate API key)
422Request validation error (FastAPI)
429rate_limit_exceededRate limit exceeded (check Retry-After header)

Handling errors

resp = requests.get(url, headers=headers)
if resp.status_code == 429:
    retry_after = int(resp.headers.get("Retry-After", 60))
    time.sleep(retry_after)
elif resp.status_code >= 400:
    error = resp.json()["error"]
    print(f"Error {error['code']}: {error['message']}")