Skip to content

Refactor GPlay billing error handling and translations - #314

Merged
d4rken merged 5 commits into
mainfrom
prevent-gplay-caused-crashes
Aug 30, 2025
Merged

Refactor GPlay billing error handling and translations#314
d4rken merged 5 commits into
mainfrom
prevent-gplay-caused-crashes

Conversation

@d4rken

@d4rken d4rken commented Jul 21, 2025

Copy link
Copy Markdown
Member
  • Prevent google play related errors from throwing inside the app-level coroutine scope and crashing the app.
  • Show an error pop-up for such errors

@d4rken d4rken added the bug Something isn't working label Jul 21, 2025
d4rken added 5 commits August 30, 2025 16:50
This commit introduces localized error messages for Google Play billing issues and refactors the error handling in `UpgradeRepoGplay`.

- `BillingException` and `BillingResultException` now implement `HasLocalizedError` to provide user-friendly error messages.
- New string translations for billing error labels and descriptions have been added for various languages.
- `UpgradeRepoGplay` now includes an `error` field in its `Info` state to propagate billing errors.
- The `upgradeInfo` flow in `UpgradeRepoGplay` has been updated with a `retryWhen` operator to handle errors more gracefully. If an error occurs but the pro state was recent, it emits a grace period state. Otherwise, it emits the error.
- `OverviewFragmentVM` now observes `upgradeState` and posts any non-pro errors to `errorEvents` for display.
@d4rken
d4rken force-pushed the prevent-gplay-caused-crashes branch from 747be28 to cf9b53e Compare August 30, 2025 14:50
@d4rken d4rken closed this Aug 30, 2025
@d4rken d4rken reopened this Aug 30, 2025
@d4rken
d4rken merged commit 89e46d3 into main Aug 30, 2025
13 checks passed
@d4rken
d4rken deleted the prevent-gplay-caused-crashes branch August 30, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant