Skip to main content

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

  1. Always use try-catch around SDK calls
  2. Check error types with instanceof
  3. Log errors for debugging
  4. Show user-friendly messages to users
  5. Implement retry logic for transient failures
  6. Monitor error rates in production
  7. Have fallbacks for non-critical features

Next Steps

Troubleshooting

Common issues and solutions

Quickstart

Full integration tutorial