Tsara uses the HTTP status code together with the JSON envelope.
Common status code patterns
200
200Request succeeded.
400
400Invalid request payload, missing required input, or unsupported combination.
401
401Unauthorized. Usually means the wrong key type or an invalid token was supplied.
404
404Requested resource was not found.
409
409Conflict, duplicate, or insufficient-balance condition depending on the endpoint.
422
422Structured validation failure.
500
500Internal application error.
502
502Upstream provider failure or provider rejection when Tsara cannot return a cleaner downstream code.
503
503Temporary service unavailability, commonly when a provider quote or provisioning dependency is unavailable.
Error handling guidance
- always read both the HTTP status code and
message - if
errorsis present, show or log field-level validation details - treat
502and503as retry-aware conditions, not as permanent client-side validation errors - when using idempotent flows, retry with the same idempotency key where supported