-
Notifications
You must be signed in to change notification settings - Fork 187
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
Better error/fail handling #15
Comments
Can you PR? |
No time sorry :( Feel to patch it with that |
+1 vote to promote this peace of code to the main branch |
You should use |
@chirag04 Could you please merge that? |
@DenisIzmaylov waiting for @fisch0920 to update the PR as per @grabbou's feedback. |
BTW can we try to use |
May be we can do it ourselves? |
It looks not informant still (PaymentCancelled error example):
We should you index of this enum: It looks a little bit weird. |
As @DenisIzmaylov mentioned, the error codes are very difficult to work with now. I used the following map to make them usable in my codebase: // Mapping from error codes returned by In-App-Utils to Apple's StoreKit errors.
// See: https://developer.apple.com/documentation/storekit/skerror.code
// NOTE: RCTJSErrorFromNSError prepends ESKERRORDOMAIN to make errors unique across
// iOS domains.
var STORE_KIT_ERRORS = {
ESKERRORDOMAIN0: 'unknown',
ESKERRORDOMAIN1: 'client_invalid',
ESKERRORDOMAIN2: 'payment_canceled',
ESKERRORDOMAIN3: 'payment_invalid',
ESKERRORDOMAIN4: 'payment_not_allowed',
ESKERRORDOMAIN5: 'store_product_not_available',
ESKERRORDOMAIN6: 'cloud_service_permission_denied',
ESKERRORDOMAIN7: 'cloud_service_network_connection_failed',
ESKERRORDOMAIN8: 'unknown'
}; Something like this should be added to this library. I'm not interested in creating a PR at this time, though. |
Updated link for |
Hey, awesome work here!
In my fork (branch stranger) I added this to get more information at failing time. Otherwise if the user cancel or something else happen, I can't hide HUDs or react in the UI in any way.
The text was updated successfully, but these errors were encountered: