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

Crash when instrumenting request with null headers #1925

Closed
OuranosSkia opened this issue Dec 21, 2023 · 1 comment · Fixed by #1926
Closed

Crash when instrumenting request with null headers #1925

OuranosSkia opened this issue Dec 21, 2023 · 1 comment · Fixed by #1926

Comments

@OuranosSkia
Copy link
Contributor

Description

When instrumenting some older libraries, it appears that newrelic does not properly handle things and causes a crash. In this case, the instrumentation is happening where opts.headers is null instead of an object or undefined. null does not get handled properly by defaulting and throws an error when it checks for the existence of specific headers.

image

Expected Behavior

The system should handle opts.headers being null the same as undefined and thus properly default it to an empty object for handling.
NOTE: # ( Tell us what you expected to happen. )

Troubleshooting or NR Diag results

Steps to Reproduce

It's difficult to reproduce as the situation is very specifically dependent on both the system we use and the way we use it (which I do not feel comfortable sharing here).
NOTE: # ( Please be as specific as possible. )
TIP: # ( Link a sample application that demonstrates the issue. )

Your Environment

  • ex: Browser name and version:
  • ex: Node version:
  • ex: Operating System and version:

Additional context

@workato-integration
Copy link

@newrelic-node-agent-team newrelic-node-agent-team added this to Triage Needed: Unprioritized Features in Node.js Engineering Board Dec 21, 2023
Node.js Engineering Board automation moved this from Triage Needed: Unprioritized Features to Done: Issues recently completed Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Node.js Engineering Board
  
Done: Issues recently completed
Development

Successfully merging a pull request may close this issue.

1 participant