error-handling
Installation
SKILL.md
Error Handling and Retry Strategies
Every Play Billing Library call can fail. Network connections drop, Google Play Services restarts, users cancel purchases, and payment methods get declined. This skill gives you a phased path from reading a BillingResult to shipping a retry layer that recovers gracefully without hammering Google's servers.
Phase 1: Read BillingResult correctly
Every PBL operation returns a BillingResult with two fields. Treat them asymmetrically.
responseCodeis the integer constant you branch on. Always use the constants fromBillingClient.BillingResponseCode, never the raw integer.debugMessageis a log only string. Google can change the text at any time, so never parse it and never show it to users.