Handle errors from the Billing SDK using structured error classes. Each error type provides specific information to help you debug issues and display appropriate messages to your users.Documentation Index
Fetch the complete documentation index at: https://funnelfox.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
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
