Core concepts

Errors and status codes

Errors have the same shape as in DAWA — and every response has a request id you can send us.

The format

Errors on /dawa have the same shape as in DAWA, so your existing error handling keeps working:

JSON
{
  "type": "QueryParameterFormatError",
  "title": "One or more query parameters was ill-formed.",
  "details": [["postnr", "The postcode must be 4 digits"]]
}

details depends on the type: for QueryParameterFormatError it is pairs of [parameter, message], for ResourceNotFoundError the id that was not found ({ "id": "…" }).

Log X-Request-Id. Every response has the X-Request-Id header. Send it to support and we
can look up exactly your call — without it we can only guess from time and address.

The types

CodeTypeWhat you do
400QueryParameterFormatErrorFix the parameter — details says which
401 / 403AuthorizationErrorCheck the Authorization header, or whether your plan covers the call
404ResourceNotFoundErrorThe address may be retired — try data cleansing
429TooManyRequestsErrorWait — see Rate limits
5xxInternalServerError / ServiceUnavailableErrorRetry with backoff; contact us with X-Request-Id

Two types are new compared with DAWA. DAWA had neither keys nor rate limits, so
AuthorizationError and TooManyRequestsError are the only errors your DAWA code hasn't seen before.

A 404 isn't always an error

Addresses are retired when buildings are demolished or roads are rerouted. If you get a 404 on an id you stored, the address is probably historic — run it through /dawa/datavask/adresser to find the current one.