Event: Non-Error promise rejection captured with keys: currentTarget, isTrusted, target, type
See original GitHub issuePackage + Version
-
@sentry/browser
-
@sentry/node
-
raven-js
-
raven-node
(raven for node) - other:
Version:
5.10.2
Description
My project often catch an error like Event Non-Error promise rejection captured with keys: currentTarget, isTrusted, target, type,without any useful information. And an additional data is
__serialized__ = {
currentTarget: [object Null],
isTrusted: [Circular ~],
target: head > script[type="text/javascript"],
type: error
}
looks like an Event instance. With the limited information,I don’t know where this bug is triggered,has anyone encountered the same problem?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:66
- Comments:36 (9 by maintainers)
Top Results From Across the Web
Why am I seeing events with "Non-Error exception (or ...
If you're seeing errors having the message "Non-Error exception (or promise rejection) captured with keys: x, y, z.
Read more >Non-Error promise rejection captured with value
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 >Event: Non-Error promise rejection captured with keys
My project often catch an error like Event Non-Error promise rejection captured with keys: currentTarget, isTrusted, target, type,without ...
Read more >Non-Error promise rejection captured with value: undefined
Pass something in reject('something went wrong')) ;. It's empty ( undefined ) that's why you see that error.
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 >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
It seems that this issue is caused by something roughly like this:
The
onerror
hook will actually receive anEvent
object, instead of anError
instance, which is causing these issues that are mentioned above. This can be avoided by wrapping theEvent
with anError
as suggested by https://developer.mozilla.org/de/docs/Web/API/HTMLScriptElement:This error just depleted my quota capacity.