Skip to content

How errors work

Every error has the content type application/problem+json and this shape (RFC 9457).

{
"type": "https://docs.customer.onsim.uk/errors/invalid-request",
"title": "The request is not valid",
"status": 400,
"errors": [
{ "field": "from", "detail": "is required" }
]
}
Field Meaning
type The kind of error. It is a link to a page of this section. Decide on this field, not on the title.
title A short summary of the kind of error.
status The HTTP status.
detail What went wrong in this request. Not every error has it.
errors Each parameter that is not valid. Only invalid-request has it, and not every invalid-request does.
Problem Send it again?
rate-limited, service-unavailable, timeout Yes, after a wait.
quota-exceeded Yes, on the next day (UTC).
internal-error Once. If it fails again, tell us.
Every other problem No. Change the request first.