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

Send all unhandled rejections and uncaught exceptions to the error log #46638

Merged
merged 1 commit into from
Oct 21, 2020

Conversation

scinos
Copy link
Contributor

@scinos scinos commented Oct 21, 2020

Changes proposed in this Pull Request

Testing instructions

Checkout the branch and add an error, for example add setTimeout( () => fake(), 5000 ); to client/server/index.js

Then start the server with yarn start. You should see something like

09:47:31.146Z ERROR calypso: fake is not defined
    ReferenceError: fake is not defined
        at Timeout._onTimeout (/Users/sergio/src/automattic/wp-calypso/build/webpack:/client/server/index.js:83:2)
        at listOnTimeout (internal/timers.js:549:17)
        at processTimers (internal/timers.js:492:7)

(the timestamp and the string ERROR calypso: implies it comes from bunyan's error logger)

@matticbot
Copy link
Contributor

@scinos scinos requested a review from a team October 21, 2020 09:55
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 21, 2020
@scinos scinos self-assigned this Oct 21, 2020
@matticbot
Copy link
Contributor

This PR does not affect the size of JS and CSS bundles shipped to the user's browser.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Contributor

@griffbrad griffbrad left a comment

Choose a reason for hiding this comment

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

👍🏻 LGTM

@scinos scinos merged commit 1ac594a into master Oct 21, 2020
@scinos scinos deleted the add/generic-error-logger branch October 21, 2020 19:25
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Oct 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants