Prerequisites
- SDK installed and configured (see SDK Quickstart)
Error types
HTTP errors
The SDK throws errors for HTTP response codes indicating failures:Network errors
Connection issues throw standard JavaScript errors:- Connection timeout
- DNS resolution failure
- Network unreachable
Validation errors
Query or data validation failures return detailed error messages:- NQL syntax errors
- Schema validation failures
- Invalid parameter values
Basic error handling
Wrap SDK calls in try-catch blocks:Handling specific errors
Check the error status for specific handling:Rate limiting
Handle rate limits with exponential backoff:Query error handling
NQL queries can fail for various reasons:Validating before execution
Catch syntax errors before running expensive queries:Creating an error wrapper
Build a reusable error handler:Logging errors
Implement structured error logging:Graceful degradation
Provide fallbacks when services are unavailable:Best practices
Troubleshooting
Related content
Authentication
Configure authentication properly
API Keys
Manage API keys and permissions
Tracking Jobs
Handle async operation errors
SDK Reference
Complete SDK documentation

