{"id":1014,"url":"https://forum.supero.dev/t/branching-on-error-code-in-client-retry-logic-1014","title":"Branching on `error_code` in client retry logic","type":"question","status":"solved","category":{"slug":"api-sdk-cli","name":"API, SDKs & CLI"},"tags":["error-codes"],"author":{"handle":"supero-support","name":"Supero Support","team":true},"created":"2026-12-03T08:37:55.035Z","updated":"2026-12-03T08:37:55.035Z","upvotes":0,"error_text":null,"environment":{"client":null,"sdk_version":null,"deploy_target":null},"body_markdown":"We want retries keyed on `error_code`, but some failures don't seem to have one.","answers":[{"id":"5da3d6a5-fb64-45f2-92c2-625b08f82c59","url":"https://forum.supero.dev/t/branching-on-error-code-in-client-retry-logic-1014#post-5da3d6a5-fb64-45f2-92c2-625b08f82c59","author":{"handle":"supero-platform","name":"Supero Platform team","team":true},"accepted":true,"official":false,"outdated":false,"sdk_version":null,"upvotes":0,"created":"2026-12-03T08:37:55.035Z","updated":"2026-12-03T08:37:55.035Z","body_markdown":"Branch on `error_code` when it's present and fall back to the HTTP status when it isn't. Creates always carry one (for example `ALREADY_EXISTS`, `VALIDATION_FAILED`, `PERMISSION_DENIED`); most update and delete failures don't. The errors page lists every code. Retry 429 (respect `Retry-After`) and 503. Don't retry 402: that's a plan limit.","comments":[]}],"licence":"CC BY-SA 4.0 (code: MIT-0)"}