code is a stable machine string - branch on it, not on the human message. details
is present on a few errors with extra structure (see below).
Codes
details payloads
Some errors carry structured details:
403 product limit reached (follow a product past your plan cap):
403 spend cap required (a credit tool on a credential with no spend budget - keys: set a cap in Settings → API keys; OAuth connections: reconnect and allow a credit budget):
402 spend cap reached (the credential’s rolling 30-day budget would be exceeded):
402 out of credits (the team’s balance is too low):
429 rate limited:
Handling
Checksuccess first, then switch on error.code: