Overview
Proper error handling is crucial for building reliable document processing applications. This guide covers all Pulse API error codes, retry strategies, and best practices for graceful error recovery.Error Response Format
All errors follow a consistent JSON structure:Error Categories
Authentication
AUTH_XXX - API key issues
Request
REQ_XXX - Invalid parameters
File
FILE_XXX - File format/size issues
Schema
SCHEMA_XXX - Schema validation
Billing
BILLING_XXX - Usage limit issues
Processing
PROC_XXX - Processing failures
Job
JOB_XXX - Async job issues
Storage
STORAGE_XXX - Storage issues
General
GENERAL_XXX - Server errors
Complete Error Code Reference
Authentication Errors (AUTH_XXX)
| Code | HTTP | Description | Solution |
|---|---|---|---|
AUTH_001 | 401 | API key is required | Include x-api-key header in request |
AUTH_002 | 401 | Invalid API key | Verify key in Console |
AUTH_003 | 401 | API key expired | Generate new key in Console |
AUTH_004 | 403 | Insufficient permissions | Check API key permissions |
AUTH_005 | 401 | Organization not found | Verify your organization exists |
AUTH_006 | 403 | Access restricted to whitelisted domains | Contact support for domain whitelisting |
Request Errors (REQ_XXX)
| Code | HTTP | Description | Solution |
|---|---|---|---|
REQ_001 | 400 | No file or URL provided | Include either file or file_url parameter |
REQ_002 | 400 | Invalid request body | Validate JSON syntax and structure |
REQ_003 | 400 | Invalid parameter value | Check parameter format and allowed values |
REQ_004 | 400 | Missing required parameter | Check API documentation for requirements |
REQ_005 | 400 | Invalid chunk size | Use chunk size between 100-10000 |
REQ_006 | 400 | Invalid page range | Use format like 1-5 or 1,3,5 |
File Errors (FILE_XXX)
| Code | HTTP | Description | Solution |
|---|---|---|---|
FILE_001 | 400 | Invalid file type | Use supported formats: PDF, JPG/JPEG, PNG, DOCX, PPTX, XLSX, HTML |
FILE_002 | 413 | File too large | Maximum file size is 100MB |
FILE_003 | 400 | File corrupted | Verify file integrity, re-save if needed |
FILE_004 | 400 | Empty file | Ensure file has content |
FILE_005 | 400 | Failed to download from URL | Check URL accessibility and permissions |
FILE_006 | 408 | Timeout downloading file | Use a faster hosting service or upload directly |
FILE_007 | 400 | Invalid file URL | Provide a valid, accessible URL |
Schema Errors (SCHEMA_XXX)
| Code | HTTP | Description | Solution |
|---|---|---|---|
SCHEMA_001 | 400 | Invalid schema format | Ensure schema conforms to JSON Schema spec |
SCHEMA_002 | 400 | Schema processing failed | Simplify schema or check document compatibility |
SCHEMA_003 | 400 | Schema too complex | Reduce nesting depth (max 5 levels) |
SCHEMA_004 | 400 | Unsupported schema type | Use supported data types only |
SCHEMA_005 | 400 | Schema validation timeout | Simplify schema or reduce document size |
Billing Errors (BILLING_XXX)
| Code | HTTP | Description | Solution |
|---|---|---|---|
BILLING_001 | 403 | Trial expired | Upgrade to a paid plan |
BILLING_002 | 403 | Page limit exceeded | Upgrade plan or wait for monthly reset |
BILLING_003 | 402 | Payment required | Add payment method in Console |
BILLING_004 | 403 | Plan limit reached | Upgrade to a higher tier |
BILLING_005 | 402 | Billing status unknown | Contact support |
BILLING_006 | 403 | Account suspended | Resolve billing issues in Console |
BILLING_007 | 402 | Payment failed | Update payment method |
BILLING_008 | 402 | Payment requires authentication | Complete 3D Secure verification |
BILLING_009 | 403 | Subscription canceled | Resubscribe to continue |
BILLING_010 | 402 | Subscription past due | Update payment method |
BILLING_011 | 403 | No active subscription | Subscribe to a plan |
BILLING_012 | 402 | Free tier limit exceeded | Upgrade required to continue |
BILLING_013 | 402 | Storage settings restricted on free tier | Upgrade to use storage features |
Processing Errors (PROC_XXX)
| Code | HTTP | Description | Solution |
|---|---|---|---|
PROC_001 | 500 | Document processing failed | Retry or contact support if persistent |
PROC_002 | 408 | Processing timeout | Use async endpoint or process fewer pages |
PROC_003 | 500 | Service temporarily unavailable | Retry after a few minutes |
PROC_004 | 503 | Rate limit exceeded | Implement exponential backoff |
PROC_005 | 500 | Partial extraction failure | Some elements couldn’t be processed |
Job Errors (JOB_XXX)
| Code | HTTP | Description | Solution |
|---|---|---|---|
JOB_001 | 404 | Job not found | Verify job ID; jobs expire after 48 hours |
JOB_002 | 409 | Job already cancelled | Job cannot be modified |
JOB_003 | 410 | Job expired | Resubmit the extraction request |
JOB_004 | 409 | Job still processing | Wait and poll again |
JOB_005 | 500 | Job failed | Check error details; retry if transient |
Storage Errors (STORAGE_XXX)
| Code | HTTP | Description | Solution |
|---|---|---|---|
STORAGE_001 | 500 | Failed to store results | Retry the extraction |
STORAGE_002 | 404 | Results not found | Results may have expired |
STORAGE_003 | 500 | Storage service unavailable | Retry after a few minutes |
STORAGE_004 | 507 | Storage limit exceeded | Delete old extractions or upgrade |
STORAGE_005 | 404 | Extraction expired | Reprocess the document |
General Errors (GENERAL_XXX)
| Code | HTTP | Description | Solution |
|---|---|---|---|
GENERAL_001 | 500 | Internal server error | Retry; contact support if persistent |
GENERAL_002 | 503 | Service unavailable | Check status page; retry later |
GENERAL_003 | 504 | Gateway timeout | Use async endpoint for large documents |
GENERAL_004 | 429 | Too many requests | Implement rate limiting with backoff |
GENERAL_005 | 501 | Feature not implemented | Feature not yet available |
Handling Errors in Code
Basic Error Handling
Comprehensive Error Handler
Retry Strategies
Exponential Backoff
Circuit Breaker Pattern
Intelligent Retry Logic
Error Recovery Patterns
Graceful Degradation
Partial Success Handling
Best Practices
Always Handle Errors
Always Handle Errors
- Never assume API calls will succeed
- Catch and handle specific error codes
- Provide meaningful error messages to users
- Log errors for debugging
Implement Retry Logic
Implement Retry Logic
- Use exponential backoff for transient errors
- Set reasonable retry limits
- Only retry retryable errors
- Add jitter to prevent thundering herd
Monitor Error Patterns
Monitor Error Patterns
- Track error frequencies
- Alert on error spikes
- Analyze patterns for optimization
- Review logs regularly
Graceful Degradation
Graceful Degradation
- Have fallback strategies
- Accept partial success
- Inform users of degraded functionality
- Queue for later retry if appropriate
Common Error Scenarios
Scenario 1: File Upload Issues
Scenario 2: Async Job Management
Next Steps
API Reference
See endpoint details
