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

Remove two blank error log statements in the default error handler #1470

Closed
mpvosseller opened this issue Jun 6, 2020 · 2 comments · Fixed by #1471
Closed

Remove two blank error log statements in the default error handler #1470

mpvosseller opened this issue Jun 6, 2020 · 2 comments · Fixed by #1471

Comments

@mpvosseller
Copy link
Contributor

mpvosseller commented Jun 6, 2020

The default error handler calls console.error() (with no arguments) twice.

console.error();

Unfortunately this causes some confusing noise in AWS Lambda + CloudWatch which shows these as "ERROR undefined" log entries

Would you consider a PR to do one of the following:

  • simply remove these two error statements
  • remove these two empty statements AND add two \n inside the call console.error(msg.replace(/^/gm, ' '));
  • add an option to skip the log statements

Thanks

@mpvosseller
Copy link
Contributor Author

For context this is what it looks like in AWS CloudWatch when viewing the error log. Each console.error() statement causes a log entry. So each invocation of the default error handler causes three entries when the first and last are useless noise.

Screen Shot 2020-06-06 at 2 19 52 PM

@mpvosseller
Copy link
Contributor Author

mpvosseller commented Jun 7, 2020

See PR #1471 which implements the second option above.

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 a pull request may close this issue.

1 participant