Skip to content

Conversation

tonidero
Copy link
Contributor

@tonidero tonidero commented Aug 26, 2025

Description

Until now, if trying to restore a purchase with a payment pending error, the SDK returned an UnknownBackendError code. This should be returned instead with a PaymentPendingError code for proper handling.

Note that restore errors return the error of the last post receipt with errors. If there were multiple errors, all might not be exposed right now.

@tonidero tonidero added the pr:fix A bug fix label Aug 26, 2025
@tonidero tonidero marked this pull request as ready for review August 26, 2025 07:18
@tonidero tonidero requested a review from a team August 26, 2025 07:18
Copy link

codecov bot commented Aug 26, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 78.46%. Comparing base (2cf9059) to head (c5540bf).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...n/kotlin/com/revenuecat/purchases/common/errors.kt 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2635      +/-   ##
==========================================
- Coverage   78.47%   78.46%   -0.01%     
==========================================
  Files         302      302              
  Lines       11303    11305       +2     
  Branches     1571     1571              
==========================================
+ Hits         8870     8871       +1     
- Misses       1745     1746       +1     
  Partials      688      688              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tonidero tonidero added this pull request to the merge queue Aug 26, 2025
Merged via the queue into main with commit 71e6961 Aug 26, 2025
21 checks passed
@tonidero tonidero deleted the handle-payment-pending-errors-when-restoring-properly branch August 26, 2025 10:56
This was referenced Aug 27, 2025
tonidero pushed a commit that referenced this pull request Aug 28, 2025
**This is an automatic release.**

## RevenueCat SDK
### ✨ New Features
* Add option to disable automatic ID collection when setting attribution
network IDs at configuration time (#2643) via Toni Rico (@tonidero)
### 🐞 Bugfixes
* Handle payment pending errors when restoring properly (#2635) via Toni
Rico (@tonidero)

## RevenueCatUI SDK
### Paywallv2
#### ✨ New Features
* MON-1193 Support delayed close button (Component Transitions) (#2623)
via Jacob Rakidzich (@JZDesign)
#### 🐞 Bugfixes
* Fix PaywallDialog going over screen size on Android 35+ (#2642) via
Toni Rico (@tonidero)
### Customer Center
#### ✨ New Features
* Add button_text to ScreenOffering (#2638) via Facundo Menzella
(@facumenzella)

### 🔄 Other Changes
* Chore: Update detekt yml file (#2637) via Jacob Rakidzich (@JZDesign)
* Update CHANGELOG for version 8.23.0 release (#2636) via Toni Rico
(@tonidero)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2633) via RevenueCat Git Bot (@RCGitBot)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
tonidero added a commit that referenced this pull request Sep 10, 2025
### Description
Until now, if trying to restore a purchase with a payment pending error,
the SDK returned an `UnknownBackendError` code. This should be returned
instead with a `PaymentPendingError` code for proper handling.

Note that restore errors return the error of the last post receipt with
errors. If there were multiple errors, all might not be exposed right
now.
@tonidero tonidero mentioned this pull request Sep 10, 2025
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