Created
April 23, 2020 16:24
-
-
Save uphotelagency/5b290e5edaa6aceaf38eb17dc730a242 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const result = polly().handle(error => error.status === 429) | |
.waitAndRetry(retryTimes).executeForPromise(async () => { | |
const response = await axios.get(`${apiUrl}/booking/v1/offer-index`, requestConfig); | |
if (response.data) { | |
return response.data; | |
} | |
return Promise.reject(); | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment