Overview
The Ilumiera AI B2B API uses standard HTTP status codes and provides error messages to help you understand and resolve issues. All error responses follow a consistent structure.HTTP Status Codes
Success Codes
- 200 OK: Request completed successfully
- 201 Created: Resource created successfully (e.g., organization creation)
Client Error Codes
- 400 Bad Request: Invalid request parameters or malformed data
- 401 Unauthorized: Missing or invalid authentication credentials
- 403 Forbidden: Valid credentials but insufficient permissions
- 404 Not Found: Requested resource not found
- 429 Too Many Requests: Rate limit exceeded (if implemented)
Server Error Codes
- 500 Internal Server Error: Unexpected server error
- 502 Bad Gateway: Upstream service unavailable
- 503 Service Unavailable: Service temporarily unavailable
- 504 Gateway Timeout: Request timeout
Error Response Format
Error responses typically include an error message:Common Error Scenarios
Authentication Errors
Missing Firebase Token
Invalid API Key
Missing API Key
Organization Errors
Organization Not Found
API Key Not Found
Source Processing Errors
Invalid Source ID
Unauthorized Source Access
Processing Failed
Content Generation Errors
Quiz Generation Failed
Flashcard Generation Failed
Mind Map Generation Failed
Resource Not Found
Quiz Not Found
Flashcard Not Found
Mind Map Not Found
Error Handling Best Practices
1. Check Response Status
2. Implement Retry Logic
For transient errors (5xx status codes), implement exponential backoff:3. Handle File Upload Errors
When uploading files, handle specific error cases:4. User-Friendly Error Messages
Map API errors to user-friendly messages:Debugging Tips
1. Log Full Response Details
2. Check CORS Headers
If experiencing CORS issues in the browser:3. Validate Request Format
Always validate your request format before sending:Getting Help
If you encounter persistent errors:- Double-check your authentication: Ensure you’re using the correct authentication method for each endpoint
- Verify endpoint URLs: Make sure you’re using the correct base URL and path
- Check request format: Ensure your request body matches the expected format
- Contact support: Email [email protected] with error details and timestamps
