onRetry and retryInstance not working
See original GitHub issueI have following code:
createAuthRefreshInterceptor(
axios,
async () => {
localStorage.removeItem('accessToken');
try {
await store.dispatch('refreshToken', {
refreshToken: localStorageService.getRefreshToken()
});
return Promise.resolve();
} catch (error) {
return Promise.reject(error);
}
},
{
onRetry: config => {
console.log(config);
return config;
}
}
);
Refreshing the token works as expected, but when re-requested, the payload is sent in a wrong(string) format (2 image) instead fine(object) format (1 image). I tried to add a handler to the onRetry parameter but nothing happens.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Error retries - Amazon Elastic Compute Cloud
The AWS SDKs implement automatic retry logic for requests that return error responses. You can configure the retry settings for the AWS SDKs....
Read more >Resilience4j Retry does not retry - Stack Overflow
But I need to retry the createOrder(String orderId) method which fails some of the times. Although the annotation is different, but may be...
Read more >Resilience4j retry not working for java.net.ConnectException
Hi we see that retry is not happening when our db connection is down but retry callback method is called without retrying. But...
Read more >Transient fault handling - Azure - Microsoft Learn
While an occasional transient failure and retry are to be expected, and do not indicate a problem, regular and increasing numbers of retries...
Read more >Retry tasks on different hosts - IBM
Ensure that you modify the application profile to keep the service instance alive for the Invoke method (Service > Control > Method >...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
When you’re saving object to local storage, it needs to be “stringified”, which I believe your
localStorageService
is doing behind the scenes. When you get the token from the storage, it needs to be parsed in order to create the object…The issue has been resolved, thanks. Helped point 2