Support for "Unhandled promise rejection" / "Uncaught (in promise)"
See original GitHub issueExample use case (JSBin):
var p = new Promise(function(resolve, reject) {
window.setTimeout(
function() {
reject();
}, 10);
});
p.then(function () {
console.log('done!');
});
If the promise throws an exception, and there’s no error handler, the browser will spit out an uncaught promise error.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:18
- Comments:41 (19 by maintainers)
Top Results From Across the Web
Tracking Unhandled Promise Rejections - TrackJS
When a promise is rejected, it looks for a rejection handler. If it finds one, like in the example above, it calls the...
Read more >What is an unhandled promise rejection? - Stack Overflow
Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit...
Read more >Handling those unhandled promise rejections with JS async ...
[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was ......
Read more >Window: unhandledrejection event - Web APIs | MDN
The unhandledrejection event is sent to the global scope of a script when a JavaScript Promise that has no rejection handler is rejected; ......
Read more >Unhandled Promise Rejections in Node.js - The Code Barbarian
Note that, while the error parameter to the 'unhandledRejection' event should be a JavaScript error, it doesn't necessarily have to be. Calling ...
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
what’s the TL;DR solution here?
@joaocunha – looking at the code above, it looks like you could do the following as a workaround: