Error format
Errors come back in one of three shapes. Most endpoints use the first one; the other two exist on specific paths and are listed here so your client does not miss an error code it is looking for. Standard. Acode for programmatic handling, nested under detail.error:
detail — this response
is produced before the request reaches the endpoint:
code next to detail, and detail holds the
message itself:
detail is an array of field errors rather than a string, and a few internal checks
return {"detail": "..."} with a plain message. Some 422 responses do carry a code in the standard
shape — a reused idempotency key, for example.
HTTP status codes
Common error codes
Returned in the standard shape, underdetail.error.code:
Node API (
node.tronrental.com) has error codes of its own, in a different format — see
Node API → Limits and errors.Auto Refill codes
Returned in the standard shape by the Auto Refill endpoints:Withdrawal verification codes
POST /api/v1/account/withdrawal returns these verification codes in the flat shape, with code next
to detail. Other errors on the same endpoint use the standard shape:
Retry strategy
Retry5xx responses with exponential backoff. For 429, prefer the Retry-After header when the
response carries one, and check the body first — not every 429 is a rate limit
(see Rate Limits).