Warning: a promise was rejected with a non-error: [object Error]
See original GitHub issueA warning is fired when I reject a Promise with an new Error('...')
, but Promise and Error are from different Window
's (e.g. window.opener and window child - from window.open or iframe.contentWindow).
Of cource, it means, that rejectReason instanceof Error
returns false
, because Error is instance of iframe.contentWindow.Error (not of window.Error)
Issue Analytics
- State:
- Created 8 years ago
- Comments:29 (12 by maintainers)
Top Results From Across the Web
Promise rejected with non-error warning - Stack Overflow
This just means that the error that was thrown is not an instanceof Error . For example, the following is not an error,...
Read more >a promise was rejected with a non-error: [object Array] · Issue ...
Working with native Promise i got this warning. Warning: a promise was rejected with a non-error: [object Array] If validation errors exists ......
Read more >Warning Explanations - Bluebird.js
Warning: a promise was rejected with a non-error. Due to a historic mistake in JavaScript, the throw statement is allowed to be used...
Read more >Non-Error promise rejection captured with value - #sentry
I'm getting tons of errors from from what appears to be a recursive call generating a lot of errors from one unhandled exception:...
Read more >توییتر \ Kat Marchán در توییتر: «(node:3864) Warning: a ...
(node:3864) Warning: a promise was rejected with a non-error: [object Undefined] Is there any way to get node.js to give me a callsite?...
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 Free
Top 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
I’m also getting the “promise was rejected with a non-error” warning for regular
new Error(...)
type errors when the code runs inside PhantomJS with Bluebird 3.x.It worked fine with Bluebird 2.9.x
The only warning suppression flag I see there is for when you forget to return a promise.
wForgottenReturn is the only warning type that can be separately configured. The corresponding environmental variable key is BLUEBIRD_W_FORGOTTEN_RETURN.
Maybe I am missing something? In any case, I only get the warning on startup when es6-shim tries to initialize and test the features supported by the Promise impl in the env. See https://github.com/paulmillr/es6-shim/blob/8583cbe2186ec12bfbf4218ccbce7fc73f96de87/es6-shim.js#L2654
I’ll suppress this myself so no worries. Just wanted to know if there is a way to turn it off already.