Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handle ignore_status_codes defined as strings #109

Closed
wants to merge 1 commit into from
Closed

handle ignore_status_codes defined as strings #109

wants to merge 1 commit into from

Conversation

pierrevalade
Copy link

This should solve the problem with NEW_RELIC_ERROR_COLLECTOR_IGNORE_ERROR_CODES not working as expected.

For example, if you want to ignore in your 401 errors, and 404 errors, you can set:

NEW_RELIC_ERROR_COLLECTOR_IGNORE_ERROR_CODES=404,401

and it should work with that change.

return expect(urltils.isError(config, 401)).false;
});

it("should handle ignore_status_codes defined as integers", function () {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was working before, just added one more test to make sure

@othiym23
Copy link
Contributor

Ah, this would explain a bug people have been seeing intermittently since the launch of the module. Good find! Thanks for passing this on!

Because isError is called at least once for each request, I think I want a solution that doesn't require the codes list to be reconverted on every single call. I'll play around with this and tell you what I come up with.

@pierrevalade
Copy link
Author

Good point.

@othiym23
Copy link
Contributor

othiym23 commented Feb 1, 2014

Hi, Pierre! Sorry for the delay, but this is now fixed in 7d3b835, which is part of v1.3.1 of the module, now on npm. Thanks for the report!

@othiym23 othiym23 closed this Feb 1, 2014
@pierrevalade
Copy link
Author

👍

cmcadams-newrelic pushed a commit to cmcadams-newrelic/node-newrelic that referenced this pull request Jan 29, 2024
…/prisma-app/app/semver-6.3.1

chore(deps): bump semver from 6.3.0 to 6.3.1 in /prisma-app/app
jsumners-nr pushed a commit to jsumners-nr/node-newrelic that referenced this pull request Apr 11, 2024
…/protobufjs-7.2.4

Bump protobufjs from 7.2.3 to 7.2.4
jsumners-nr pushed a commit to jsumners-nr/node-newrelic that referenced this pull request Apr 16, 2024
…/urijs-1.19.9

Bump urijs from 1.19.8 to 1.19.9
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this pull request Apr 19, 2024
updates the sns instrumentation based on the onResolved hook
bizob2828 pushed a commit to bizob2828/node-newrelic that referenced this pull request Apr 23, 2024
updates the sns instrumentation based on the onResolved hook
bizob2828 added a commit to bizob2828/node-newrelic that referenced this pull request Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants