Troubleshooting “Non-Error promise rejection captured with value: Object Not Found Matching Id” in Sentry, from MERN App

enter image description here

This is an issue we’ve had for a while now, although this error has recently been appearing much more frequently for us in Sentry. Clicking into the issue does not give us much more info:

enter image description here

Like any painful error, we are having difficulty recreating the issue on our end – going to these website URLs does not cause this issue locally for me (although, I am on Mac, not Windows). A few related questions we have:

  • is this something we can safely ignore in Sentry?
  • if safe to ignore, is it better to ignore in the Sentry website in the Browser by clicking the ignore button, or by adding ignoreErrors into our Sentry.init() with

We initialize Sentry in our React App with this snippet in our index.js file:

Sentry.init({
    dsn: config.dsn,
    integrations: [
        new Integrations.BrowserTracing()
    ],
    tracesSampleRate: 1.0
});

and we initialize in our Node App in it’s index.js file:

const sentryDsn = env === 'development' ? null : config.SENTRY_DSN;
Sentry.init({ dsn: sentryDsn, tracesSampleRate: 1.0 });

I show both initializations as I am not sure if this is an error coming from our React app or our Node App, although I think it’s from our React App. Also, from this article, it seems like we could ignore these errors directly from our app with the following added to Sentry.init({}):

ignoreErrors:[
   "Non-Error exception captured",
   "Non-Error promise rejection captured"
]

We also found this related github issue, although it doesn’t seem like there are any great conclusions in here as well. Any recommendations as to what our best course of action is here, and how we could potentially further troubleshoot this, would be super helpful! Thanks!