Errors
The error envelope, status codes, and retry behaviour.
The envelope
Every error shares one shape:
body carries the original framework response when available — for validation failures it
holds per-field messages, which is usually what you want to surface.
Typed errors
Both SDKs raise a typed error per status, so you can branch without string-matching.
Status codes
A 404 is also what you get for a brain that exists but belongs to a different subject —
the API doesn’t distinguish, so it can’t be used to probe for other users’ brains.
Retries
Both SDKs retry 429 and 5xx automatically with exponential backoff. Tune per call:
400, 401, and 404 are not retried — they won’t succeed on a second attempt.