In our testing, we tried a sandbox PurchaseProduct on Android that resulted in a code 10 network error:
"message": "Error performing request.",
"context": "PurchaseProduct",
"underlyingErrorMessage": "Hostname api.revenuecat.com not verified:\n certificate: sha1/3LiOs5Y962AdAv8grdgm7+0i67g=\n DN: CN=*.gci-mckinsey.com\n subjectAltNames: [*.gci-mckinsey.com]",
"readableErrorCode": "NetworkError",
"code": 10
The tester then attempted to purchase the same subscription and got a code 6 (ITEM_ALREADY_OWNED). Because of this, our app triggered a SyncPurchase, resulting in a subscribed status for the user after a few seconds.
However, a email was promptly sent to our tester by GooglePlay about the subscription being cancelled as in that scenario, no acknowledgement had apparently been sent by Revenue Cat.
So apart from the network issue, the concern for us is that recovered transactions are not acknowledged by the API. If it can help debug, the UserID is DBE441C2AD27727E
To try to mitigate this issue, we plan to now do an Android Restore when receiving a network error on a PurchaseProduct. Especially since we can expect a callback in that case (SyncPurchase is a simple synchronous call). Would this be enough?
Is there a better option to recover from a network error on a PurchaseProduct? What is the API retrying pattern for network errors on a PurchaseProduct?