Error Types
The SDK provides specific error classes:ValidationError
Input validation failures:GizaAPIError
API errors (4xx, 5xx):TimeoutError
Request timeouts:NotImplementedError
Features not yet available:Error Handling Patterns
Retry with Exponential Backoff
User-Friendly Messages
Best Practices
- Always use try-catch around SDK calls
- Check error types with
instanceof - Log errors for debugging
- Show user-friendly messages to users
- Implement retry logic for transient failures
- Monitor error rates in production
- Have fallbacks for non-critical features