DNAbyD3Docs

Errors

Every error code the API returns, and what to do about it.

An error returns a status and a body like this one. Branch on code; the message is for people and may change. param names the parameter or field at fault, when there is one.

{
  "error": {
    "code": "invalid_record",
    "message": "ttl must be \"auto\" or 60 to 86400 seconds.",
    "param": "ttl"
  }
}
StatusCodeMeaningWhat to do
400invalid_requestA parameter, field or body isn't validFix what param names
401missing_keyNo Authorization headerSend Authorization: Bearer <key>
401invalid_keyThe key is unknown, revoked or expired, or lacks Bearer Use a live key, after Bearer
403https_requiredThe request used plain HTTPUse https://, and grant the key access again
403missing_permissionThe key lacks the access this needsAsk an owner or admin for required_permission
404not_foundNo such endpoint, or earnings while Access and pricing is offCheck the path; for earnings, see Access and pricing
404domain_not_foundNo such domain, or the key's access doesn't reach itCheck the name, and what the key reaches with GET /me
404record_not_foundNo such record on this domainList the records to find its id
405method_not_allowedThe path doesn't take this method, OPTIONS includedSee the Allow header
409domain_not_activeThe domain isn't active on DNA's nameserversFinish the nameserver change
409record_conflictThe record clashes with one on the same nameChange or delete the other record first
409record_existsAn identical record already existsOn create, nothing: it's there. On update, delete one of them
413body_too_largeThe body is over 64 KBSend a smaller body
422invalid_recordThe record isn't valid; param names the field when it canFix the value
429rate_limitedToo many requestsWait Retry-After seconds
500internal_errorA failure on our side during a readRetry
500outcome_unknownA failure on our side during a writeRead the record before retrying
502upstream_unavailableA temporary failure; nothing changedRetry shortly
504outcome_unknownNo answer in time; the write may have savedRead the record before retrying