All news errors follow a consistent structure with detailed information for debugging:
News Subscription Error Codes
These errors are specific to news subscription operations and should be handled appropriately in your application.
Official WebSocket Error Codes
Based on the official API documentation, these are the only WebSocket error codes:
Error Handling Strategy
Implementation Examples
Authentication Error Handling
Reconnection for Lost Authentication
Error Details by Code
AUTHENTICATION_FAILED
Cause : API key authentication failed
Common Issues :
Invalid API key format (must start with byul_v2_)
API key doesn’t exist
API key has been revoked
Solution : Verify API key from dashboard
NOT_AUTHENTICATED
Cause : Client not authenticated, reconnection required
Common Issues :
Connection dropped during authentication
Session expired
Authentication state lost
Solution : Reconnect with valid API key
SUBSCRIPTION_FAILED
Cause : News subscription setup failed
Common Issues :
Invalid minImportance value (must be 0-10)
Invalid limit value (must be 1-100)
Invalid subscription parameters
Solution : Validate parameters before subscribing
WEBSOCKET_NOT_SUPPORTED
Cause : WebSocket not available on current plan
Affected Plans : Test (Free), Starter ($19/month) **Solution**: Upgrade to Pro ($99/month) or Enterprise plan
Client-Side Validation
Best Practices
Error Logging
Log all errors with full context for debugging
Include timestamp and user session information
Monitor error rates and patterns
User Experience
Provide clear, actionable error messages
Show suggestions when available (e.g., symbol suggestions)
Implement graceful degradation for non-critical errors
Error Recovery
Implement automatic retry for transient errors
Respect rate limits and retry-after headers
Clean up failed subscriptions to prevent limit issues