When I submitted my app for review on the Play Store, it was rejected due to a "Broken functionality policy violation." The email included a screenshot that shows "The item that you were attempting to purchase could not be found."
After investigating this error, I found that it occurs when the app is used with the non-License Tester. Therefore, I attached the License Tester account information to the app submission details and explained to the reviewer how to log in with the License Tester account. However, the app was rejected for the same reason again. In this case, how can I pass the review?
It seems that the reviewer is not logging in with an account registered with the License Tester, so I looked for other methods. In one article, it was reported that it was possible to pass the review by ensuring that the error dialog would not appear, even if the purchase could not actually be completed.
So, I ran the app locally using an Android device logged in with a non-License Tester account, and I found that the error dialog occurs at the following line:
```
CustomerInfo customerInfo = await Purchases.purchasePackage(package);
```
I tried modifying the code as follows to display a dialog indicating that the purchase conditions were not met, rather than showing the error dialog when the item cannot be retrieved:
```
try {
CustomerInfo customerInfo = await Purchases.purchasePackage(package);
} on PlatformException catch (e) {
var errorCode = PurchasesErrorHelper.getErrorCode(e);
if (errorCode == PurchasesErrorCode.productNotAvailableForPurchaseError) {
// Display a dialog indicating that the purchase conditions were not met
}
}
```
However, the error is caught only after the error dialog for the unavailable item has already been displayed, and I don't know how to display my custom message dialog without showing the error dialog.
How can I modify appearing dialog?