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

I can't name my error handler handle() #171

Closed
alavers opened this issue Aug 4, 2014 · 1 comment
Closed

I can't name my error handler handle() #171

alavers opened this issue Aug 4, 2014 · 1 comment

Comments

@alavers
Copy link

alavers commented Aug 4, 2014

I've debugged a very confusing RangeError: Maximum call stack size exceeded error that I began getting after trying out newrelic. I was hoping I might save someone else from the same trouble.

It has to do with error handling. Here's roughly what I had:

function handle(err, req, res, next) {
    // actual code truncated for convenience
    next(err);
}
app.use(handle);

This breaks because app.use(handle) is going to call newrelic's injected handle() method, not mine, which then infinitely recurses. Simply renaming handle() fixes the issue.

I'm not sure how, but maybe there's some way for newrelic to flag a warning whenever this happens.

@txase
Copy link

txase commented Aug 4, 2014

Hi @alavers,

That shouldn't be happening. It should work no matter how you code it.

That said, we are closing down our support of the agent through GitHub issues. If you continue to have any issues, please follow up at http://support.newrelic.com. We are better able to support you through our dedicated portal. We appreciate your understanding as we undergo this transition.

@txase txase closed this as completed Aug 4, 2014
@newrelic newrelic locked and limited conversation to collaborators Aug 4, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants