"Non-Error promise rejection captured with value:"

See original GitHub issue

Hi all!

I didn’t want to create a bug as I don’t believe there is a bug here considering this error has been talked about a few times here. TL:DR - We are receiving a copious amount i these errors with no values provided. I can’t see anything that sticks out in our code for why this is happening, but I don’t want to dismiss this as an external factor. Some information about our Sentry Setup:

"@sentry/browser": "^6.2.5",
"@sentry/integrations": "^6.2.5", 
"@sentry/react": "^6.2.5",
"@sentry/tracing": "^6.2.5"
...
integrations: [new Integrations.BrowserTracing(), new ExtraErrorData()],

Was curious if anyone has any advice/thoughts on how to to begin debugging this further? Thanks in advance for your time!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

20reactions
abhishek1234321commented, Jun 22, 2021

This is most likely happening due to the safe links being scanned by Outlook

If you have an Office 365 subscription and your emails contain links to your site and these links use Safe Links feature then it is bound to happen

We were able to reproduce this and get the error in Sentry

For details see this thread https://forum.sentry.io/t/unhandledrejection-non-error-promise-rejection-captured-with-value/14062

20reactions
wynnwcommented, Apr 28, 2021

This started happening to us on April 16th, on a day where we didn’t change any code at all. Since them we’ve had 98k of these errors. We’ve added some code to filter this out in our js as we can’t figure out a way to silence these at all. I’m guessing it’s related to some password manager like lastpass as it only happens on our login page, with chrome, on windows 10. We’ve added code like:

            beforeSend: function(event, hint) {
                // filter out UnhandledRejection errors that have no information
                if (event !== undefined && event.exception !== undefined && event.exception.values !== undefined
                    && event.exception.values.length == 1) {
                    var e = event.exception.values[0];
                    if (e.type === 'UnhandledRejection' && e.value === 'Non-Error promise rejection captured with value: ') {
                        return null;
                    }
                }
           }

If there’s a better way to deal with this, I’d love to know about it. On one hand, I can see how you don’t want to editorialize here and prevent these errors, but when there’s no info at all there’s nothing actionable and we can’t do anything about it other than be annoyed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

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 >
Why am I seeing events with "Non-Error exception (or promise ...
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: undefined
Pass something in reject('something went wrong')) ;. It's empty ( undefined ) that's why you see that error.
Read more >
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 >
Promise.reject() - JavaScript - MDN Web Docs
The static Promise.reject function returns a Promise that is rejected. For debugging purposes and selective error catching, it is useful to ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found