Skip to content

Commit

Permalink
Merge pull request #6 from fenderdigital/improve-error-handling
Browse files Browse the repository at this point in the history
Improve error handling
  • Loading branch information
cristian-montejano authored Sep 27, 2021
2 parents 084d624 + 3aac04a commit 2e07b58
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions android/src/play/java/com/dooboolab/RNIap/RNIapModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ public void flushFailedPurchasesCachedAsPending(final Promise promise) {

@ReactMethod
public void getItemsByType(final String type, final ReadableArray skuArr, final Promise promise) {

if (skuArr.size() <= 0) {
promise.reject("There was an issue obtaining products. Please try again later.");
}

ensureConnection(
promise,
billingClient -> {
Expand Down

0 comments on commit 2e07b58

Please sign in to comment.