Guides

Errors

All errors are returned as application/problem+json (RFC 9457) with a stable, machine-readable code. Branch on code (or the HTTP status), never on human-readable text.

Error shape

HTTP/1.1 404 Not Found
Content-Type: application/problem+json
X-Request-ID: 7d1e9c2a-3b4f-4c5d-8e6f-9a0b1c2d3e4f
X-API-Version: 1.0.0

{
  "type": "https://docs.talero.dk/problems/not_found",
  "title": "Resource not found",
  "status": 404,
  "detail": "Invoice not found",
  "code": "not_found"
}
FieldDescription
typeURI of the problem documentation page on this site.
titleShort human-readable summary. Stable per code, but not for machine use.
statusThe HTTP status code, repeated in the body.
detailHuman-readable explanation specific to this occurrence. May change; do not parse.
codeStable machine-readable identifier. Branch on this.

Error codes

CodeStatusMeaning
invalid_request400The request is malformed: invalid JSON, missing or invalid parameters, malformed UUIDs or dates, or a missing Idempotency-Key.
unauthorized401Missing, invalid, expired or revoked credentials.
forbidden403Valid credentials, but the granted scopes do not permit this operation.
not_found404The resource does not exist or belongs to another company.
rate_limited429Too many requests in the current window. Retry after Retry-After seconds.
internal_error500Unexpected server error. Safe to retry with backoff.
service_unavailable503A dependency is temporarily unavailable. Retry with backoff.

X-Request-ID

Every response — success or error — carries an X-Request-ID header identifying that exact request in Talero's logs. Log it with your own request records, and quote it when contacting support: it lets us find the request without any guesswork.

Responses also carry X-API-Version (currently 1.0.0) and the rate limit headers.

Handling errors

  • 4xx errors are yours to fix — retrying the identical request will fail again (except 429, which succeeds after the window resets).
  • 5xx errors are transient — retry with exponential backoff. Creation retries are safe because of idempotency keys.
  • OAuth token endpoint errors follow RFC 6749 ({"error": "...", "error_description": "..."}) rather than problem+json.