question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

XHR timeout does not trigger reject on the Promise

See original GitHub issue

Axios 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:closed
  • Created 8 years ago
  • Reactions:3
  • Comments:10 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
rgrangercommented, Apr 1, 2016

Hi ! This issue is still relevant. When will the fix be released on npm ? Thanks.

0reactions
L3V147H4Ncommented, Aug 31, 2016

I’ll try it

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found