Skip to content

Return error in queryPurchases if error connecting to billing client#1072

Merged
tonidero merged 1 commit into
mainfrom
return-error-if-error-connecting
Jun 19, 2023
Merged

Return error in queryPurchases if error connecting to billing client#1072
tonidero merged 1 commit into
mainfrom
return-error-if-error-connecting

Conversation

@tonidero

Copy link
Copy Markdown
Contributor

Description

I noticed Google's queryPurchases method would never end if we got a connection error to the billing client (either a FEATURE_NOT_SUPPORTED or BILLING_UNAVAILABLE error).

This makes it so the method returns the error in the error callback.

@tonidero tonidero added the pr:fix A bug fix label Jun 16, 2023
@tonidero tonidero requested a review from a team June 16, 2023 09:28
@tonidero tonidero marked this pull request as ready for review June 16, 2023 09:28
@codecov

codecov Bot commented Jun 16, 2023

Copy link
Copy Markdown

Codecov Report

Merging #1072 (5eb214f) into main (d669a99) will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1072      +/-   ##
==========================================
+ Coverage   85.64%   85.75%   +0.11%     
==========================================
  Files         176      176              
  Lines        6247     6249       +2     
  Branches      859      860       +1     
==========================================
+ Hits         5350     5359       +9     
+ Misses        563      557       -6     
+ Partials      334      333       -1     
Impacted Files Coverage Δ
.../com/revenuecat/purchases/google/BillingWrapper.kt 83.07% <100.00%> (+1.64%) ⬆️

@NachoSoto NachoSoto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

@tonidero tonidero merged commit eb7e7a1 into main Jun 19, 2023
@tonidero tonidero deleted the return-error-if-error-connecting branch June 19, 2023 06:39
tonidero pushed a commit that referenced this pull request Jun 23, 2023
**This is an automatic release.**

### Bugfixes
* Default customer info schema version to latest known by SDK (#1080)
via Toni Rico (@tonidero)
* Handle other diagnostics-related exceptions (#1076) via Toni Rico
(@tonidero)
* Return error in queryPurchases if error connecting to billing client
(#1072) via Toni Rico (@tonidero)
### Other Changes
* Fix offline entitlements integration tests (#1085) via Toni Rico
(@tonidero)
* Add defaultsRelease variant tests run configuration (#1074) via Toni
Rico (@tonidero)
* Compose sample app: move to gradle catalog (#1081) via Toni Rico
(@tonidero)
* Compose sample app: automate builds (#1082) via Toni Rico (@tonidero)
* Compose sample app (#1056) via Toni Rico (@tonidero)
* Migrate to Gradle version catalog (#1059) via Cesar de la Vega
(@vegaro)
* Trusted entitlements: Add logs with verification mode (#1067) via Toni
Rico (@tonidero)
* Sync pending purchases before getting customer info (#1073) via Toni
Rico (@tonidero)
* Refactor syncing pending transactions logic out of `Purchases` (#1058)
via Toni Rico (@tonidero)
* Refactor CustomerInfo listener and cache logic into
CustomerInfoUpdater (#1052) via Toni Rico (@tonidero)
* Trusted entitlements: Add integration tests (#1071) via Toni Rico
(@tonidero)
* Trusted entitlements: Add internal mechanism to force signing errors
for tests (#1070) via Toni Rico (@tonidero)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants