Errors
The problem+json error shape, what each status means, and which errors to retry.
Every error from /api/v1 is an RFC 7807 problem document with Content-Type: application/problem+json. Each one has a stable code. Branch on code, never on title or detail: the text can change, the code does not.
The shape
{
"type": "https://errors.renzo.app/watchlist_limit_reached",
"title": "Watchlist Limit Reached",
"status": 409,
"code": "watchlist_limit_reached",
"detail": "This product allows 3 watchlists.",
"instance": "/api/v1/watchlists",
"correlation_id": "0b6f3c1e8f4a4d2b9a573e2c1d0f9a11",
"limit": 3,
"held": 3,
"product_code": "free"
}| Field | Meaning |
|---|---|
type | A URI made from the code. Treat it as an ID; it is not a web page. |
title | A short summary of the error kind. |
status | The HTTP status, the same as the response status. |
code | The stable, machine-readable error code. See Error codes. |
detail | A sentence about this occurrence. For people, not for code. |
instance | The path that failed. |
correlation_id | The request ID, also in the X-Request-ID header. Quote it to support. |
Some errors add fields, such as limit, held and product_code above, retry_after_seconds on a 429, or slug and access_level on article_sign_in_required. The API reference shows the possible codes of each operation, with an example body.
Validation errors
A body or parameter that fails validation answers 422 validation_failed with an errors list:
{
"type": "https://errors.renzo.app/validation_failed",
"title": "Validation Failed",
"status": 422,
"code": "validation_failed",
"detail": "The request body or parameters did not pass validation.",
"instance": "/api/v1/watchlists",
"correlation_id": "0b6f3c1e8f4a4d2b9a573e2c1d0f9a11",
"errors": [
{ "location": ["body", "name"], "message": "Field required", "type": "missing" }
]
}location names the part of the request: body, query or path, then the field. A few checks made by the endpoint itself, such as a limit over 100, answer the same code with only a detail and no errors list.
Status codes
| Status | Meaning | Typical codes |
|---|---|---|
| 400 | The request is malformed. | bad_request, invalid_cursor |
| 401 | No valid credential. | missing_credentials, token_expired, session_revoked |
| 402 | A payment failed. | billing_payment_declined |
| 403 | The credential is fine, but the action is not allowed. | article_access_required, customer_account_deactivated |
| 404 | Nothing there, or not yours. | not_found, watchlist_not_found |
| 405 | The path does not take this method. | method_not_allowed |
| 409 | The request conflicts with the current state. | profile_incomplete, watchlist_limit_reached, idempotency_key_reused |
| 410 | The resource is gone for good. | article_archived |
| 413 | The body is too large. | payload_too_large |
| 415 | The body is not JSON. | unsupported_media_type |
| 422 | The body or parameters are invalid. | validation_failed, username_invalid |
| 429 | Too many requests. | rate_limited |
| 500 | A bug on our side. | internal_error |
| 502 | The payment provider failed. | billing_provider_failed |
| 503 | A dependency is down for a moment. | service_unavailable, dependency_unavailable, auth_temporarily_unavailable |
A resource that belongs to someone else answers 404, not 403, so IDs do not leak.
How to handle errors
- Read
code. Handle the codes your feature expects, such as a plan limit. Showdetailonly as a fallback. - On
401token_expired, refresh the token pair once, then repeat the call. On any other401, sign in again. See Authentication. - On
429and503, wait for theRetry-Afterheader (seconds), then retry. See Rate limits. - On
500and502, retry a few times with backoff. For writes, send anIdempotency-Keyso a retry cannot act twice. See Idempotency. - Do not retry other
4xxerrors unchanged. Fix the request first. - Log
correlation_idwith every error.
Errors that are not HTTP errors
A few codes never come as an HTTP status:
- MCP tool calls report errors inside the tool result, such as
mcp_daily_limit_reached. See MCP. - A market quote can carry an
errorobject when a symbol's data is stale or missing, such asmarket_data_stale_cache. The call itself answers200.
The error code catalog marks these with the status "none".