Mailspring/internal_packages/onboarding/lib
Evan Morikawa d4db0737cf feat(error): improve error reporting. Now NylasEnv.reportError
Summary:
The goal is to let us see what plugins are throwing errors on Sentry.

We are using a Sentry `tag` to identify and group plugins and their
errors.

Along the way, I cleaned up the error catching and reporting system. There
was a lot of duplicate error logic (that wasn't always right) and some
legacy Atom error handling.

Now, if you catch an error that we should report (like when handling
extensions), call `NylasEnv.reportError`. This used to be called
`emitError` but I changed it to `reportError` to be consistent with the
ErrorReporter and be a bit more indicative of what it does.

In the production version, the `ErrorLogger` will forward the request to
the `nylas-private-error-reporter` which will report to Sentry.

The `reportError` function also now inspects the stack to determine which
plugin(s) it came from. These are passed along to Sentry.

I also cleaned up the `console.log` and `console.error` code. We were
logging errors multiple times making the console confusing to read. Worse
is that we were logging the `error` object, which would print not the
stack of the actual error, but rather the stack of where the console.error
was logged from. Printing `error.stack` instead shows much more accurate
stack traces.

See changes in the Edgehill repo here: 8c4a86eb7e

Test Plan: Manual

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2509
2016-02-03 18:06:52 -05:00
..
account-choose-page.cjsx fix(auth): Track authentication success / failure rates by provider 2015-12-08 16:39:38 -08:00
account-settings-page.cjsx feat(error): improve error reporting. Now NylasEnv.reportError 2016-02-03 18:06:52 -05:00
account-types.coffee fix(onboarding): Minor style changes, headers for EAS 2016-01-20 17:09:15 -08:00
initial-packages-page.cjsx feat(newsletter): Manage subscription directly from N1 2016-01-07 18:44:40 -08:00
initial-preferences-page.cjsx Fix AccountStore.current() references in private packages 2016-01-25 18:02:56 -08:00
main.coffee feat(startup): new option to launch on system start 2016-01-28 12:02:08 -08:00
nylas-api-environment-store.coffee refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
onboarding-actions.coffee fix(onboarding): Invitation code system, just in case 2015-10-04 16:49:41 -07:00
page-router-store.coffee refactor(rip-current-account): Rips out AccountStore.current 2016-01-08 14:22:13 -08:00
page-router.cjsx refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
token-auth-api.coffee refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
token-auth-page.cjsx refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
welcome-page.cjsx bump(electron): 0.34.3 => 0.35.1 2015-11-23 22:09:17 -08:00