You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using New Relic for observability in our React/NextJS application. It is currently causing this error to fire on many different pages throughout our application:
Unhandled Promise Rejection: Failed to fetch
As per the breadcrumbs, we can see this is always happening when New Relic is making a post request and it fails.
Describe the solution you'd like
A way in the UI, or in the bugsnag configuration, to ignore all errors that originate from this type of New Relic request.
Describe alternatives you've considered
From what I can tell, there isn't a way to explicitly "catch" and ignore errors from new relic, since it is an agent that runs in the background.
I saw this solution which lets us ignore errors based on the message text, but I don't want to ignore all Unhandled Promise Rejection: Failed to fetch errors, only ones that were caused by the New Relic fetch failing.
Perhaps there is a way to access the breadcrumbs when using the pattern the author suggests in this post?
Any thoughts or advice would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
ian-whitestone
changed the title
A method to ignore errors based on the breadcrumbs
[Feature request / question] A way to ignore errors based on the breadcrumbs
Jul 7, 2023
ian-whitestone
changed the title
[Feature request / question] A way to ignore errors based on the breadcrumbs
[Feature request / question] A way to ignore errors based on the breadcrumbs?
Jul 7, 2023
It is possible to access the breadcrumb information from within an onError callback
Something like below would check if the most recent breadcrumb's request url is that of New Relic and then prohibit sending that event.
onError: function (event) {
if(event.breadcrumbs[event.breadcrumbs.length-1].metadata["request"].includes("bam.nr-data.com")){
return false
}
}
Obviously this is a relatively simplistic example and you could extend that to be more specific for your own needs.
Would something like this suit your needs?
As we haven't heard back from you in a while, going to close this out. I hope the above solution fits your needs but do let us know if not and we can reopen this as necessary.
Description
We are using New Relic for observability in our React/NextJS application. It is currently causing this error to fire on many different pages throughout our application:
Unhandled Promise Rejection: Failed to fetch
As per the breadcrumbs, we can see this is always happening when New Relic is making a post request and it fails.
Describe the solution you'd like
A way in the UI, or in the bugsnag configuration, to ignore all errors that originate from this type of New Relic request.
Describe alternatives you've considered
Unhandled Promise Rejection: Failed to fetch
errors, only ones that were caused by the New Relic fetch failing.Any thoughts or advice would be greatly appreciated!
The text was updated successfully, but these errors were encountered: