Error codes
Every error code the API documents, with the statuses it comes with and the TypeScript SDK methods that can answer it.
Every error code the API's document names, 333 of them, read from each operation's refusals. A failed call's code is one of these (Errors and retries): decide on the code, never on the status alone, since one status covers several.
What a code means for a method, and whether it is worth sending again, is on that method's page, under Errors. Any call can also answer 503 temporary_failure (and, for a call that reaches a mailbox, mailbox_reopening, mailbox_closing or mailbox_unavailable): wait its Retry-After, then send again, which is safe for a read and for a write that carries an idempotency key.