Errors
Every failure returns JSON in one shape: a rejected parameter, an unknown path, a fault on our side alike. There are no HTML error pages anywhere on the API.
{
"error": "not_found",
"message": "Brand not found.",
"hint": "Check the slug against GET /brands.",
"docs": "https://api.dials.co/docs"
}error is the stable, machine-readable part and is safe to branch on:
| Code | Meaning |
|---|---|
invalid_request | A parameter or the path shape was rejected |
unauthorized | The endpoint needs a session you do not have |
forbidden | The session exists but may not do this |
not_found | The resource does not exist |
rate_limited | Over budget; see rate limits |
internal_error | Our fault; safe to retry with backoff |
message is prose and may be reworded. hint says what to change about the
request.