Error Types
AISDKError
The primary error type used by the Decart provider. All runtime errors are instances ofAISDKError from the @ai-sdk/provider package.
NoSuchModelError
Thrown when attempting to use an unsupported model type (e.g., trying to calllanguageModel() or textEmbeddingModel() on the Decart provider).
The Decart provider only supports image and video models. Language models and text embedding models are not supported.
Common Error Scenarios
API Authentication Errors
Occur when the API key is missing, invalid, or expired. Error pattern:Timeout Errors
Occur when video generation takes longer than the configuredpollTimeoutMs.
Error pattern:
Job Failure Errors
Occur when the video generation job fails on the server side. Error pattern:Abort Signal Errors
Occur when a request is cancelled via anAbortSignal.
Error pattern:
Network Errors
Occur when the network request fails (connection issues, DNS failures, etc.). Error pattern:Warnings
The Decart provider returns warnings for unsupported settings that don’t cause failures but are ignored.Unsupported Settings
When you provide settings that aren’t supported by the model, warnings are included in the response:Warnings don’t prevent video generation. The unsupported parameters are simply ignored, and generation proceeds with supported settings.
Best Practices
Comprehensive Error Handling
Implement robust error handling for production applications:Retry Strategy
Implement exponential backoff for transient errors:Validation Before API Calls
Validate inputs before making API calls to catch errors early:Debugging Tips
Enable Request Logging
Use a custom fetch function to log all requests:Check API Status
If you’re experiencing errors, verify the Decart API status and your account:- Check the Decart Status Page for any service disruptions
- Verify your API key is valid and hasn’t expired
- Check your account quota and usage limits
Related Resources
- Configuration - Learn about provider configuration options
- Provider Options - Learn about video-specific options including timeout settings