I'm doing a query to the Alexa API which, for some unknown reason, will occasionally fail. When it does fail, I want to automatically retry the query, up to 10 times.
When it fails, the response returned by the API contains the substring AuthFailure
.
What kind of loop can I do that will retry the query until either the response returned does not contain the substring AuthFailure
or 10 retries have been attempted?