code, a suggestion and a retryable flag (see Errors). A good client:
- Branches on
code, never on the wording oftitleordetail. - Retries only when
retryableistrue, waiting forRetry-Afterwhen the response has it and backing off when it doesn’t. - Stops on everything else and shows
suggestion, because the same request will fail the same way. - Logs
request_idfrom the body or theRequest-Idheader.
Errors never cost API credits, so a retry that fails again costs nothing.