Your data. Anywhere you go.

New Relic for iOS or Android

Download on the App Store    Android App on Google play

New Relic Insights App for iOS

Download on the App Store

Learn more

Close icon

Feature Idea: Duplicate Errors Generated by .noticeError()



I have a custom error handler that leverages .noticeError(err, customParameters) as well as sends a response to the client with a custom error message. The problem is this error is then logged twice in New Relic APM as follows:

  1. the .noticeError() call, which contains all the useful information about the error
  2. the 40X or 50X sent to the client, which does not contain any useful information

I would like to be able to either tell New Relic to ignore the second error if .noticeError() was called or have New Relic do that automatically.

This issue has already been opened here, but all the New Relic accounts that responded have been disabled so not sure if anyone is actually tracking to it.

New Relic edit

  • I want this, too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.

Errors duplicating on .noticeError()
Getting duplicated errors with noticeError()

Hey @casey— like you mentioned above, this is a feature idea. I have added a poll here so that everyone can vote on this idea. I will also take all the great input you provided and pass it along to our product team! Thanks for pitching in and check back for updates! :blush:


Hello, Lindsay.

Could you tell if there’s already a solution for this? Was the feature implemented?


Hi there @avieira - No news on this feature yet. If you haven’t already, please vote, and be sure to add any additional details about how you would like to see it implemented. Our engineering teams love all that extra detail!



I would like to push for this feature as well, as it seems really necessary for proper error management in a production environment, where we want to log all possible information without leaking implementation details to the outside world.

In terms of implementation, passing an additional parameter to .noticeError() that would act as a flag to replace the error current transaction might also send would be great.

Maybe something like .noticeError(error, customParameters, replaceTransactionError)?

Or simply do it by default, as it doesn’t really make sense to have 2 errors for a single transaction in errors analytics. At least, I don’t see use cases where we would want to count 2 errors for the same transaction, considering the .noticeError is not coming from a background job.


Hey @alex_hooked - I got your thoughts on this added internally for you :smiley: Thanks for commenting in great detail!