Skip to content
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

Improvements on error handling #69

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cb-amutha
Copy link
Contributor

No description provided.

STORE_PROBLEM(2010),
INVALID_RECEIPT(2011),
REQUEST_FAILED(2012),
PRODUCT_PURCHASED_ALREADY(2013);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should include system error and restore errors here?

}
case let .failure(error):
_result(FlutterError.productIdentifierError(error.localizedDescription))
_result(FlutterError.productIdentifierError(error))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we update the example to denote how to handle the errors?

BillingClient.BillingResponseCode.USER_CANCELED -> PURCHASE_CANCELLED
BillingClient.BillingResponseCode.ITEM_UNAVAILABLE -> PRODUCT_NOT_AVAILABLE
BillingClient.BillingResponseCode.DEVELOPER_ERROR -> INVALID_PURCHASE
BillingClient.BillingResponseCode.ITEM_ALREADY_OWNED -> PRODUCT_PURCHASED_ALREADY
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add the corresponding error codes in dart as well?

BILLING_UNAVAILABLE(2021),
ITEM_UNAVAILABLE(2022),
ITEM_NOT_OWNED(2023),
ITEM_ALREADY_OWNED(2024),
Copy link
Contributor

Choose a reason for hiding this comment

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

We should add these right?

Copy link

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

3 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants