bluebird: Warning: a promise was rejected with a non-error: [object Error]

A 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)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 29 (12 by maintainers)

Commits related to this issue

Most upvoted comments

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