Error classes
The SDK includes the following error types:- ValidationError - Invalid input or configuration (e.g., missing required fields, invalid field values)
- APIError - API-level errors from the Funnelfox backend (e.g., invalid price, double purchase, payment failures)
- PrimerError - Errors originating from the Primer SDK during payment processing
- CheckoutError - Errors during the checkout lifecycle (e.g., initialization or state management issues)
- NetworkError - Network connectivity or request failures
Handle errors
You can catch and handle each error type to provide appropriate user feedback:Common error codes
double_purchase- User already has an active subscriptioninvalid_price- Price ID not foundinvalid_customer- Customer data validation failedpayment_failed- Payment processing failed
