XHR timeout does not trigger reject on the Promise
See original GitHub issueAxios set the timeout for XHR request, but doesn’t listen to ontimeout
events, rejecting the promise, so my then
and catch
are never called.
The PR #227 to fixes that
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:10 (1 by maintainers)
Top Results From Across the Web
How to reject promise on d3 xhr request timeout?
I am using promises so I want to reject the promise in case of timeout. And I want to pass UI the same...
Read more >XMLHttpRequest.timeout - Web APIs - MDN Web Docs
The XMLHttpRequest.timeout property is an unsigned long representing the number of milliseconds a request can take before automatically ...
Read more >Ajax Battle: XMLHttpRequest vs the Fetch ... - OpenReplay Blog
This is not the case: the Promise successfully resolves on any response. A rejection is only likely to occur when there's no response...
Read more >Cancellation - Bluebird.js
Cancelling a promise simply means that its handler callbacks will not be called. ... return new Promise(function(resolve, reject, onCancel) { var xhr =...
Read more >Use Promise.all to Stop Async/Await from Blocking Execution ...
Promises are extremely powerful for handling asynchronous operations in ... and XML (AJAX), a technique for sending requests from a web page that...
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
Hi ! This issue is still relevant. When will the fix be released on npm ? Thanks.
I’ll try it