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
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.
The text was updated successfully, but these errors were encountered:
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.
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:
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.
The text was updated successfully, but these errors were encountered: