Skip to main content

Errors

When something goes wrong, the API answers with an HTTP status and a body in the standard problem details format, with Content-Type: application/problem+json:

{
"type": "https://developer.zentarinetworks.com/axis/errors/not_found",
"title": "Not found",
"status": 404,
"detail": "SIM not found.",
"code": "not_found",
"traceId": "0HN7Q2KJ1V3F4:00000002"
}
FieldWhat it's for
statusThe HTTP status again
codeWhat to branch on in your code. A short word that never changes once released
detailA plain-English sentence saying what happened, safe to log or show to a person
titleA short heading for the status
typeA link to the page explaining that code (this site)
traceIdQuote this to support and we can find exactly what happened
errorsOnly on validation_failed: each field and what's wrong with it

:::tip Handle errors by code, not by detail The wording of detail can improve over time; code won't change. Treat an unknown code by its status (a 4xx means change the request, a 5xx means try again later). :::

All codes​

StatuscodeMeaningRetry?
400validation_failedA field is missing or wrongNo
400invalid_requestWell-formed, but not allowed as askedNo
401unauthorizedNo API key was sentNo
401invalid_api_keyThe API key isn't validNo
402payment_requiredA card is needed, or the payment failedAfter adding a card
403insufficient_accessA read-only key tried to make a changeNo
403account_suspendedYour Axis account is suspendedOnce reactivated
403forbiddenNot available on your accountNo
404not_foundIt doesn't exist, or isn't yoursNo
409conflictClashes with how things are nowOnce the state changes
409idempotency_in_progressThe first request with this key is still runningYes, same key
422idempotency_key_reusedThe key was used for a different requestWith a new key
429rate_limitedToo many requestsAfter Retry-After
500internal_errorSomething went wrong at AxisYes, after a pause
502network_errorThe network or the payment provider said noYes, after a pause
503service_unavailableAxis is temporarily unavailableYes, after a pause

A simple strategy​