Skip to content
RUBI

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": "Invalid request",
  "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> | null;
};

Codes#

StatusCodeMeaning
400validationMalformed JSON, path parameter or query string.
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, or the global integration sync endpoint has been retired.
405method_not_allowedThis path does not accept the HTTP method.
413payload_too_largeThe request exceeds the endpoint body limit.
415unsupported_media_typeSend the content type required by the endpoint.
422validationInvalid input, see errors per field.
429rate_limitedToo many requests, slow down and retry.
502media_unavailable / identity_unavailableAn upstream media or identity provider failed.
503unavailableA required service is temporarily unavailable or not configured.

Provider search returns per-integration failures in its errors array while available matches remain usable. Selected-trader retrieval returns an upstream error when a provider fails or ignores scope filters. No partial snapshot is saved.

Integration connection checks return a ConnectionReport with ok: false and check details when the provider fails; inspect that field even on HTTP 200 or 201.

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