Skip to main content

Errors

Every error the Evinor API returns is an RFC 9457 "problem detail" document. Branch on the stable type URI or the HTTP status code — never on the human-readable title or detail, which may change.

Anatomy

Error responses use the application/problem+json content type and this shape:

{
"type": "https://docs.evinor.ai/problems/validation-failed",
"title": "Validation failed",
"status": 400,
"detail": "The request payload failed validation.",
"request_id": "8f0b2c1e-4a7d-4b93-9c2e-1d5a6f0b3c8e",
"errors": [{ "field": "filter.min_reports", "message": "Expected integer" }]
}
MemberAlways presentMeaning
typeyesStable, versioned problem-type URI under https://docs.evinor.ai/problems/. Branch on this.
titleyesShort, constant, human-readable summary for the type. Not request-specific.
statusyesThe HTTP status code, repeated in the body.
detailusuallyHuman-readable explanation of this specific occurrence.
request_idyesCorrelation id for this request. Include it when contacting support.

Some problem types add extension members:

  • validation-failed includes an errors array of { field, message } objects, one per failed field.
  • missing-scope includes a missing_scopes array naming the scope(s) the key lacks.

request_id

Every response — success or error — carries an x-request-id header, and every error body repeats it as request_id. Log it. When you report a problem to Evinor support, quoting the request_id lets us find the exact request in our logs.

You may also send your own x-request-id on a request (up to 64 characters of A-Za-z0-9_-) and Evinor will echo it back, so you can correlate a call with your own tracing. Any value outside that charset/length is ignored and a fresh id is generated instead.

Problem-type catalog

Each type URI resolves to a page on this site describing the problem and how to handle it:

StatusProblem typeWhen it happens
400validation-failedThe request payload, query, or path failed validation.
401invalid-api-keyThe API key is missing, malformed, unknown, or revoked.
403missing-scopeThe key lacks a scope the endpoint requires.
404not-foundThe referenced resource doesn't exist or isn't yours.
409idempotency-in-flightAnother request with the same Idempotency-Key is running.
422idempotency-key-conflictAn Idempotency-Key was reused for a different request.
429rate-limitedThe per-key rate limit was exceeded.
502upstream-errorAn upstream dependency returned an unexpected error.
503write-unavailableA write could not be accepted right now; safe to retry.
500internal-errorAn unexpected server error. Not your fault; retry or report.

Handling errors

  • 4xx generally means something about the request must change — fix the input, the key, or the scope before retrying.
  • 429 and 503 are safe to retry after a backoff; both include a Retry-After header telling you how long to wait.
  • 502 and 500 indicate a server-side issue; retry with backoff and, if it persists, contact support with the request_id.