Skip to main content

Error Response Format

All BoostGPT SDK methods return responses in this format:

Check for Errors

Always check the err property before using response:

Common Errors

Authentication Errors

Solution: Verify your credentials in .env file

Rate Limit Errors

Solution: Implement retry logic with exponential backoff

Invalid Bot ID

Solution: Verify the bot exists and you have access to it

Model Errors

Solution: Check model name and credit balance

Retry Logic

Implement exponential backoff for transient errors:

Try-Catch with Async/Await

Wrap SDK calls in try-catch for network errors:

Error Logging

Log errors for debugging:

User-Friendly Error Messages

Map technical errors to user-friendly messages:

Next Steps

Rate Limits

Understand API rate limits