Skip to main content
The React Native SDK surfaces errors from the underlying native SDKs. Errors are thrown as JavaScript exceptions from Promise-returning methods.

Error Handling

All SDK methods return Promises and should be wrapped in try/catch:
try {
  const result = await Encore.show('cancellation_flow');
} catch (error) {
  console.error('Encore error:', error.message);
}

Common Errors

Error CodeDescriptionResolution
SHOW_FAILEDFailed to present the offer sheetVerify placement ID exists in the Dashboard and SDK is configured
NO_ACTIVITY(Android) No current activity availableEnsure show() is called when an Activity is in the foreground

Purchase Flow Errors

When using completePurchaseRequest(), the method returns { success: false } with an error message if no pending purchase request exists — it does not throw.
const result = await Encore.completePurchaseRequest(true);
if (!result.success) {
  console.warn('No pending purchase request');
}
For platform-specific error details, see the iOS SDK errors and Android SDK errors documentation.