GraphyApiError
All API errors are wrapped inGraphyApiError. Each error carries structured metadata you can use to decide how to handle the failure:
Use the
isGraphyApiError() type guard to safely narrow unknown errors. See the Type Reference for the full class definition.
Retry Behavior
The SDK automatically retries failed requests based onretryConfig.
Default configuration:
Retryable Conditions
Custom Retry Configuration
Disable Retries
Error Codes
Errors from the API include acode field:
Network Errors
Network failures throw aGraphyApiError with retryable: true:
Abort Errors
User cancellation throws a nativeAbortError:
Stream Errors
In streaming mode, errors can arrive as events:Timeout Errors
The SDK throwsAbortError when a request exceeds the configured timeout:

