Skip to content

Errors

Errors follow RFC 9457 problem details with a stable code you can branch on.

Shape#

Error responses have the content type application/problem+json. detail is human readable, code is stable, and errors maps fields to messages on validation failures.

422 Unprocessable Entity
{
  "type": "https://api.rubikyt.com/problems/validation",
  "title": "Validation failed",
  "status": 422,
  "detail": "One or more fields are invalid.",
  "code": "validation",
  "errors": {
    "trader.full_name": "is required",
    "window_hours": "must be between 1 and 168"
  }
}
Problem type
type Problem = {
  type: string;
  title: string;
  status: number;
  detail?: string;
  code?: string;
  errors?: Record<string, string>;
};

Codes#

StatusCodeMeaning
401unauthenticatedMissing, expired or revoked credential.
403forbiddenThe key or user lacks the permission for this action.
404not_foundThe resource does not exist in your organization.
409conflictThe resource state does not allow the change, for example a decision on an unfinished interview.
410expiredA trader or share link is past its expiry.
422validationInvalid input, see errors per field.
429rate_limitedToo many requests, slow down and retry.
502integration_unreachableYour Axcera or custom API could not be reached or answered with an error.

Retry 429, 502 and any 5xx with exponential backoff. Other 4xx errors need a change in the request.