storyblok-js-client: Retry query functionality does not work
Before axios was removed, i.e. before version 5.0.0, the retry request functionality worked and you could see messages in the console about it
console.log(`Hit rate limit. Retrying in ${retries} seconds.`)
At the moment this functionality is broken and retries are not performed.
Expected Behavior
Data requests are retried in case of an error.
Current Behavior
Request crashes without retry
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 1
- Comments: 24 (3 by maintainers)
Since removing Axios HTTP responses with status code will no longer throw an exception. That is why the
section is hit. In the Axios case this would have never been hit as the request would have thrown an exception.
One way of fixing this is to do the 429 check before the 200 check as follows:
@berenar Not yet. We are looking this one with our back end team to figure out what is happening here. We’ll keep you informed through this thread.
@serGlazkov We’ll closing a pull request soon to solve this one. I’ll keep you posted here.
@serGlazkov Please try out this new version to check if the issue was solved.
@serGlazkov Thanks for the heads up. We’'l check this one.