error-handling

Categorize RevenueCat Android SDK errors and map them to user-friendly messages.

45|Updated Jun 2, 2026
One-click install
npx skills add https://github.com/RevenueCat/play-billing-skills --skill error-handling-revenuecat
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: error-handling
Source: https://github.com/RevenueCat/play-billing-skills/tree/main/revenuecat/error-handling
Command: npx skills add https://github.com/RevenueCat/play-billing-skills --skill error-handling-revenuecat

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides a structured approach to handle errors from the RevenueCat Android SDK, ensuring smooth user experience and reliable billing integration.

Core Features & Use Cases

  • Error Identification: Categorizes and identifies various errors using PurchasesError and PurchasesErrorCode.
  • User-Friendly Responses: Maps error codes to user-friendly messages for UI display.
  • Retry Logic: Implements retry logic for transient errors, with user-initiated retries for non-transient errors.
  • Use Case: When a user encounters a billing error during a purchase, this Skill guides the application to display the appropriate message and handle the error gracefully.

Quick Start

Use the error-handling skill to handle errors after a purchase attempt fails.

Frequently Asked Questions about error-handling

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I handle billing errors from the RevenueCat Android SDK?

Handle RevenueCat Android SDK billing errors by categorizing them using PurchasesError and PurchasesErrorCode, mapping error codes to user-friendly messages, and implementing retry logic for transient errors. This ensures a smooth user experience and reliable billing integration.

What is the best way to display user-friendly messages for RevenueCat purchase errors?

Display user-friendly messages for RevenueCat purchase errors by mapping PurchasesErrorCode values to appropriate UI text. This allows the application to guide users with clear responses instead of raw error data when a purchase attempt fails.

When should I use automatic retry logic versus user-initiated retries for Android billing errors?

Use automatic retry logic for transient Android billing errors, and require user-initiated retries for non-transient errors. Proper error handling requires user interaction for non-transient errors to avoid repeated failed purchase attempts.

Does this error handling approach work with any Android billing integration?

This error handling approach applies specifically to Android applications using RevenueCat for billing. It categorizes errors from the RevenueCat Android SDK and requires proper error handling and user interaction for non-transient errors.

Why do I need to categorize PurchasesError codes in my Android application?

Categorize PurchasesError codes in your Android application to identify various errors accurately and determine whether they are transient. This categorization enables the application to apply the correct retry logic or user-friendly response.