Main Error Type
The TypeScript SDK throws one typed error class for API failures:BrewApiError gives you:
statuscodetypemessageparamsuggestiondocsrequestIdretryAfter
Typical Catch Pattern
What To Branch On
- Use
typefor broad categories likenot_foundorrate_limit. - Use
codefor specific product cases likeCONTACT_NOT_FOUND.
API Errors vs Transport Errors
There are two buckets:API error
The server answered with a non-2xx response. You getBrewApiError.
Transport error
The network failed and retries were exhausted. You get a normalError.
Helpful Notes
- Log
requestIdwhen asking Brew support for help. - Trust the SDK retry behavior first before adding your own retry loop.
- For
POSTrequests, let the SDK keep idempotency on by default.
Need Help?
Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:- Self-Service Tools
- Talk to Our Team
Search Documentation
Type in the “Ask any question” search bar at the top left to instantly find relevant documentation pages.
ChatGPT/Claude Integration
Click “Open in ChatGPT” at the top right of any page to analyze documentation with ChatGPT or Claude for deeper insights.