Commit graph

5 commits

Author SHA1 Message Date
Ben Gotow 7f3731bc10 Clean up project directory structure, removing legacy packages folder 2017-08-10 19:24:10 -07:00
Ben Gotow b75aa778c7 Clean up error logging and tie to new Merani Sentry account 2017-08-10 18:09:05 -07:00
Ben Gotow d09d3d2633 Fix a few React + NodeJS warnings 2017-07-31 22:21:00 -07:00
Evan Morikawa 3e895c74c9 [client-app] fix circular errors and logging
Summary:
Errors weren't getting reported because of a circular reference causing
JSON.stringify to fail.

We can't add the whole API `response` object onto the error object,
because sometimes (like when the delta connection errors with a 401), the
`response` object is circular. We only use it to the extract the status
code anyway and it's a huge object. This diff excludes them from the
APIError objects.

We also have code to recover just in case JSON.stringify errors for some
other weird reason. It'll still attempt to report the error prefixed with
`Recovered Error`

Finally, we used to spit only the `error.stack` to the console. This meant
what we saw in the console didn't properly include the error messages
being incredibly not useful.

It's better to console.error the whole error object since that'll more
nicely display on the inspector console

Test Plan: manual

Reviewers: juan, spang, mark, halla

Reviewed By: halla

Differential Revision: https://phab.nylas.com/D4154
2017-03-09 15:11:36 -05:00
Evan Morikawa 9407533f51 [client-*] Rename packages folders and update readme 2017-02-16 13:31:37 -08:00
Renamed from packages/nylas-mail/src/error-logger.js (Browse further)