Skip to main content

ApiError

error objectrequired
codestringrequired

Machine-readable stable error code. Use this for programmatic branching.

Example: VALIDATION_ERROR
messagestringrequired

Human-readable message safe to surface to end users.

Example: The request is invalid.
details object[]

Populated on VALIDATION_ERROR — one entry per offending field.

  • Array [
  • fieldstring
    Example: email
    messagestring
    Example: must be an email
    codestring
    Example: IS_EMAIL
  • ]
  • requestIdstring

    Correlation id — matches the req.id on every structured log line for this request.

    Example: req_89a15a56-52e8-42c9-b52d-a8d7ed1bd90c
    ApiError
    {
    "error": {
    "code": "VALIDATION_ERROR",
    "message": "The request is invalid.",
    "details": [
    {
    "field": "email",
    "message": "must be an email",
    "code": "IS_EMAIL"
    }
    ],
    "requestId": "req_89a15a56-52e8-42c9-b52d-a8d7ed1bd90c"
    }
    }