Error Response Format
All Thrust API errors follow a consistent format:HTTP Status Codes
The API uses standard HTTP status codes to indicate success or failure:| Status Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request successful |
| 400 | Bad Request | Invalid parameters or missing required fields |
| 401 | Unauthorized | Authentication required or token invalid |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource doesn’t exist |
| 405 | Method Not Allowed | Wrong HTTP method (all endpoints use POST) |
| 500 | Internal Server Error | Server-side error |
Common Error Messages
Authentication Errors
Missing Authorization Header
Authorization: Bearer {token} header in your request.
Invalid or Expired Token
No User ID in Token
Validation Errors
Missing Required Fields
Invalid Parameters
Resource Errors
Token Not Found
tokenId exists and is correct.
Token Not Available on Chain
token_addresses to see available chains.
Trading Errors
Insufficient Liquidity
Insufficient Balance
Permission Errors
Access Denied to Club
Method Errors
Wrong HTTP Method
Error Handling Best Practices
1. Always Check Response Status
2. Implement Retry Logic
3. Handle Specific Error Types
4. Use Try-Catch Blocks
5. Validate Before API Calls
Debugging Tips
Enable Detailed Logging
Check Request Headers
Test with cURL
When debugging, use cURL to isolate issues:-v flag shows verbose output including headers and response codes.
Rate Limiting
While not explicitly documented, consider implementing rate limiting on your end:Getting Help
If you encounter errors not covered here:- Check the API Reference for endpoint-specific documentation
- Search or ask in our Discord community
- Email support@thrust.app with:
- The endpoint you’re calling
- Your request payload (remove sensitive data)
- The error response
- Your API client/SDK version
API Reference
View detailed documentation for all endpoints
