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.

  • responseCode is the integer constant you branch on. Always use the constants from BillingClient.BillingResponseCode, never the raw integer.
  • debugMessage is a log only string. Google can change the text at any time, so never parse it and never show it to users.
Installs
1
GitHub Stars
42
First Seen
Jun 26, 2026
error-handling — revenuecat/play-billing-skills