RanglerDeveloper
Reference

Errors

Rangler returns errors in one consistent format so integrations can handle failures reliably.

Rangler does not add generic status/message/data fields around successful responses.

  • successful reads return resource-shaped JSON
  • list endpoints return list-shaped JSON
  • errors always use the format below

Error format

{
  "error": {
    "type": "rate_limit_exceeded",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded",
    "request_id": "28fa6152-7081-492e-8a7e-00beb237b689"
  }
}

Fields

FieldTypeMeaning
error.typestringBroad error class
error.codestringStable application code for programmatic handling
error.messagestringHuman-readable message
error.request_idstringRequest correlation ID for support and debugging
error.detailsobject or array or nullOptional structured context

Common status codes

StatusMeaningTypical cause
400Bad Requestmalformed request shape or unsupported parameters
401Unauthorizedmissing, invalid, expired, revoked, or wrong-environment key
403Forbiddenorganization inactive or action not allowed
404Not Foundcompany, filing, or other resource does not exist
409Conflictresource-state conflict, or an idempotency-key conflict on an endpoint that documents idempotent writes
422Unprocessable Entityvalidation failure
429Too Many Requestsrate limit exceeded
500Internal Server Errorunexpected Rangler error

Example: missing authentication

The financial endpoint returned this response when called without an API key:

{
  "error": {
    "type": "unauthorized",
    "code": "unauthorized",
    "message": "Authentication required.",
    "request_id": "28fa6152-7081-492e-8a7e-00beb237b689"
  }
}

Example: unknown financial selector

Rangler rejects unknown selector keys instead of silently returning a different dataset:

{
  "error": {
    "type": "unknown_ratio",
    "code": "unknown_ratio",
    "message": "Unknown ratio value(s): net_margin",
    "request_id": "7e4f2525-ca82-4f1a-a261-005c757c92cf",
    "details": {
      "allowed": [
        "gross_margin",
        "net_interest_margin",
        "pat_margin",
        "return_on_equity"
      ]
    }
  }
}

Example: rate limited

{
  "error": {
    "type": "rate_limit_exceeded",
    "code": "rate_limit_exceeded",
    "message": "Rate limit exceeded",
    "request_id": "28fa6152-7081-492e-8a7e-00beb237b689"
  }
}

Headers worth handling

When Rangler rate limits a request, integrations should check:

  • Retry-After
  • X-RateLimit-Limit
  • X-RateLimit-Remaining
  • X-RateLimit-Reset

On this page