> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encorekit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Error handling in the Encore React Native SDK

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:

```tsx theme={null}
try {
  const result = await Encore.show('cancellation_flow');
} catch (error) {
  console.error('Encore error:', error.message);
}
```

## Common Errors

| Error Code    | Description                             | Resolution                                                        |
| ------------- | --------------------------------------- | ----------------------------------------------------------------- |
| `SHOW_FAILED` | Failed to present the offer sheet       | Verify placement ID exists in the Dashboard and SDK is configured |
| `NO_ACTIVITY` | (Android) No current activity available | Ensure `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.

```tsx theme={null}
const result = await Encore.completePurchaseRequest(true);
if (!result.success) {
  console.warn('No pending purchase request');
}
```

<Tip>
  For platform-specific error details, see the [iOS SDK errors](/publishers/ios/sdk-reference/presentation-result) and [Android SDK errors](/publishers/android/sdk-reference/errors) documentation.
</Tip>
