Understanding Bifrost’s structured error format and best practices for error handling.
Error Type | HTTP Status | Description |
---|---|---|
authentication_error | 401 | Invalid or missing credentials |
authorization_error | 403 | Insufficient permissions |
rate_limit_error | 429 | Rate limit exceeded |
invalid_request_error | 400 | Malformed request |
api_error | 500 | Internal server error |
network_error | 502/503 | Network or connectivity issues |
💡 Note: Bifrost automatically handles fallbacks between providers, so you don’t need to implement manual fallback logic.🌐 HTTP Transport - Basic Error Handling
💡 Note: Bifrost HTTP transport automatically handles retries and fallbacks, so simple error handling is usually sufficient.
Code | Description | Status Code | Action |
---|---|---|---|
invalid_api_key | API key is invalid or malformed | 401 | Check API key format |
api_key_expired | API key has expired | 401 | Rotate API key |
insufficient_quota | Account quota exceeded | 429 | Upgrade plan or wait |
account_deactivated | Provider account is deactivated | 403 | Contact provider support |
unauthorized_model | Model access not authorized | 403 | Check model permissions |
Code | Description | Status Code | Action |
---|---|---|---|
rate_limit_exceeded | General rate limit exceeded | 429 | Wait and retry with backoff |
concurrent_requests_exceeded | Too many concurrent requests | 429 | Reduce concurrency |
tokens_per_minute_exceeded | Token rate limit exceeded | 429 | Split requests or wait |
requests_per_day_exceeded | Daily request limit exceeded | 429 | Wait until next day or upgrade |
Code | Description | Status Code | Action |
---|---|---|---|
connection_timeout | Request timed out | 504 | Retry with exponential backoff |
connection_refused | Connection refused by server | 502 | Check service availability |
dns_resolution_failed | DNS lookup failed | 502 | Check network configuration |
proxy_error | Proxy connection failed | 502 | Check proxy settings |
/metrics
:
Task | Documentation |
---|---|
🔗 Configure providers | Providers |
🔑 Manage API keys | Key Management |
🌐 Set up networking | Networking |
⚡ Optimize performance | Memory Management |
💡 Tip: Bifrost handles complex error recovery automatically. Focus on understanding error types for monitoring and debugging rather than implementing retry logic.