Skip to content

The error format (v1 vs. dawa)

1 min read

The error format

The error shape depends on the surface.

/v1/* (native):

JSON
{ "error": {
  "type": "rate_limit_exceeded",
  "message": "Du har overskredet dit forbrugsloft. Prøv igen senere.",
  "code": 429,
  "request_id": "req_ab12cd34",
  "beskrivelse": { "da": "…", "en": "…" },
  "doc_url": "https://docs.danskadresseapi.dk/?fane=v1&side=fejl-og-statuskoder",
  "debug_url": "https://danskadresseapi.dk/dashboard/debug?req=req_ab12cd34" } }
  • code is the HTTP number (e.g. 429). type is a string. Give request_id to support.
  • If you send Accept-Language: en, message is the standard English text for the type.

/dawa/* (DAWA shape):

JSON
{ "type": "ResourceNotFoundError",
  "title": "The resource was not found",
  "details": { "id": "0a3f50…" } }
  • Validation: type: "QueryParameterFormatError", details is pair-arrays [["param","message"]].
  • 401/403 are called AuthorizationError, and 429 (both rate limit and quota) is called TooManyRequestsError. The request_id is in the X-Request-ID header.
Both surfaces keep the X-RateLimit-* and Retry-After headers, so client-side back-off works the same.
Was this helpful?