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"
}
| Field | What it's for |
|---|---|
status | The HTTP status again |
code | What to branch on in your code. A short word that never changes once released |
detail | A plain-English sentence saying what happened, safe to log or show to a person |
title | A short heading for the status |
type | A link to the page explaining that code (this site) |
traceId | Quote this to support and we can find exactly what happened |
errors | Only 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
| Status | code | Meaning | Retry? |
|---|---|---|---|
400 | validation_failed | A field is missing or wrong | No |
400 | invalid_request | Well-formed, but not allowed as asked | No |
401 | unauthorized | No API key was sent | No |
401 | invalid_api_key | The API key isn't valid | No |
402 | payment_required | A card is needed, or the payment failed | After adding a card |
403 | insufficient_access | A read-only key tried to make a change | No |
403 | account_suspended | Your Axis account is suspended | Once reactivated |
403 | forbidden | Not available on your account | No |
404 | not_found | It doesn't exist, or isn't yours | No |
409 | conflict | Clashes with how things are now | Once the state changes |
409 | idempotency_in_progress | The first request with this key is still running | Yes, same key |
422 | idempotency_key_reused | The key was used for a different request | With a new key |
429 | rate_limited | Too many requests | After Retry-After |
500 | internal_error | Something went wrong at Axis | Yes, after a pause |
502 | network_error | The network or the payment provider said no | Yes, after a pause |
503 | service_unavailable | Axis is temporarily unavailable | Yes, after a pause |