Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create unified error enums or types #127

Closed
rkotzy opened this issue Mar 25, 2020 · 3 comments
Closed

Create unified error enums or types #127

rkotzy opened this issue Mar 25, 2020 · 3 comments
Labels

Comments

@rkotzy
Copy link
Member

rkotzy commented Mar 25, 2020

Similar to the closed Flutter issue: RevenueCat/purchases-flutter#3

Expose error codes as enums or equivalent so they don't have to be hard-coded.

@aboedo aboedo added the backlog label Jun 18, 2020
@aleqsio
Copy link

aleqsio commented Sep 28, 2020

Extending on this issue, found this to be the most confusing aspect of adding RevenueCat to a react native app. I'd expect enums provided here https://docs.revenuecat.com/docs/errors to be available as fields on errors thrown from this sdk, but this is not the case.
There are a lot of different enum values for same errors like PurchaseCancelledError, PURCHASE_CANCELLED and USER_CANCELLED (guessing the last one is coming from google play).
Additionally, can't seem to find an explanation to the numeric error codes (it's not the order on that page)

@tomwanzek
Copy link

tomwanzek commented Apr 2, 2021

Just so this issue is not considered stale, not only is it still relevant, it is exacerbated by the fact that the userCancelled: boolean flag is not exposed on the TypeScript definitions of PurchasesError, which makes it hard to catch and differentially handle this "normal course of actions error".

See #228

@aboedo
Copy link
Member

aboedo commented May 17, 2021

Closing this issue as it's been fixed in release 4.1.2 🎉

@aboedo aboedo closed this as completed May 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants