google-play-billing-validator
google-play-billing-validator copied to clipboard
Support retry for API errors
Description
According to Google API docs, response code 5xx means that we should retry the validation. It would be great to have optional retry settings for the module, so it automatically retries in such cases.
Steps to Reproduce
- try to validate using verifySub, for example
- simulate 502 Bad Gateway error in code
- observe that, currently, the clients do not have any information whether the error was retriable, and the module will not retry the request
Sample code
N/A
Expected behavior:
// I expect the following method would retry in case of retriable 5xx errors, see promise-retry npm for example settings: verifySub(token, { retries: 5 })
Actual behavior:
no retry is currently supported
Versions
2.0.3
Sounds awesome. Thanks!