The envelope
Every non-2xx response carries the same shape:Error response
Error types
Eachtype maps to a status range. The status tells you how to react; the type tells you why.
Request IDs
Every response echoes a request id in theX-Request-Id header. Include it when you contact support — it lets us find the exact request in our logs.
Working in TypeScript? Each type is also a typed error subclass (DrinValidationError, DrinRateLimitError, DrinSuppressedError, …), so you can branch with instanceof. See the Errors guide and the TypeScript SDK.