Runner rejects Promise with non-error
See original GitHub issueIn runner.js there’s a Promise.reject method call with no arguments:
If we change the default Promise construct to Bluebird, it prints warnings to the console about the usage of promise rejection without an error.
http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-rejected-with-a-non-error
eg:
// file1.js
// Change default Promise to Bluebird
const Bluebird = require('bluebird');
global.Promise = Bluebird;
// file2.js
router
.route('/stats/:userId')
// GET /stats/:userId
.get([check('userId').isInt()], fooController.barBaz);
Is it desirable to stick with Promises/A+ or should we fix and play better with Bluebird?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Promise.reject() - JavaScript - MDN Web Docs
The Promise.reject() method returns a Promise object that is rejected with a given reason.
Read more >Error handling with promises - The Modern JavaScript Tutorial
In the task an error is thrown form inside the promise and promise is never settled neither with a resolve nor reject. The...
Read more >Promise reject not triggering - Stack Overflow
The Promise returned from fetch() won't reject on HTTP error status even if the response is an HTTP 404 or 500. Instead, it...
Read more >Rejected promise not throwing an uncaught exception with ...
Turns out converting a rejected promise to an exception is pretty hard, because exceptions are automatically converted to rejected promise. One ...
Read more >Reject a Promise and Handle Errors (How To) - Treehouse
If an error occurs, the promise status changes from "pending" to a "rejected" (or failed) state. Promises give you the opportunity to handle...
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
👋 this has been fixed with v6.0.0!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.