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:
{
"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
| Code | Type | What you do |
|---|---|---|
400 | QueryParameterFormatError | Fix the parameter — details says which |
401 / 403 | AuthorizationError | Check the Authorization header, or whether your plan covers the call |
404 | ResourceNotFoundError | The address may be retired — try data cleansing |
429 | TooManyRequestsError | Wait — see Rate limits |
5xx | InternalServerError / ServiceUnavailableError | Retry with backoff; contact us with X-Request-Id |
Two types are new compared with DAWA. DAWA had neither keys nor rate limits, soAuthorizationError 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.
