Error Response Format
When an API request fails, Creem returns a JSON error response:The
trace_id is included in every error response. Include it when contacting
support for faster debugging.HTTP Status Codes
Common Error Scenarios
Authentication Errors (403 Forbidden)
Returned when the API key is missing, invalid, or doesn’t have permission for the requested resource.- Verify your API key in the dashboard
- Ensure the
x-api-keyheader is included in your request - Check you’re using the correct key for the environment (test vs. production)
Validation Errors (400 Bad Request)
Returned when request parameters are missing or invalid.- Check the
messagearray for specific validation errors - Verify all required fields are included
- Ensure data types match the expected format
Resource Not Found (404)
Returned when the requested resource doesn’t exist.- Verify the resource ID is correct
- Ensure you’re using the right environment (test vs. production resources are separate)
- Check if the resource was deleted
Duplicate Resource (400 Bad Request)
Returned when trying to create a resource that already exists.- Use a unique identifier for idempotent requests
- Check if the resource already exists before creating
Handling Errors in Code
TypeScript SDK
cURL
Environments
Make sure you’re using the correct base URL:Need Help?
If you’re experiencing issues:- Check the
trace_idin your error response - Join our Discord community for quick help
- Contact support with your trace ID for faster debugging