Skip to main content

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:

Common Error Messages

Authentication Errors

Missing Authorization Header

Solution: Include the Authorization: Bearer {token} header in your request.

Invalid or Expired Token

Solution: Refresh your JWT token or re-authenticate.

No User ID in Token

Solution: The JWT token is malformed. Obtain a new token from Ory.

Validation Errors

Missing Required Fields

Solution: Include all required fields in your request body.

Invalid Parameters

Solution: Use only allowed values for enum fields.

Resource Errors

Token Not Found

Solution: Verify the tokenId exists and is correct.

Token Not Available on Chain

Solution: Use a supported chain for the token. Check token_addresses to see available chains.

Trading Errors

Insufficient Liquidity

Solution: The token may have graduated but not have sufficient Uniswap V3 liquidity yet. Try a smaller amount or wait for more liquidity.

Insufficient Balance

Solution: User doesn’t have enough tokens to complete the transaction.

Permission Errors

Access Denied to Club

Solution: User needs to hold the required token or meet visibility rules to access the club.

Method Errors

Wrong HTTP Method

Solution: All Thrust API endpoints use POST requests, not GET.

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:
The -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:
  1. Check the API Reference for endpoint-specific documentation
  2. Search or ask in our Discord community
  3. 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