[client-app] Don't report incorrect username or password to Sentry

Summary:
This is not a bug. Maaaybe we want to report this to MixPanel for individual
user debugging (how do we do that?), but it doesn't make sense to report this
error to Sentry.

Example:

https://sentry.io/nylas/nylas-mail/issues/230530818/

Test Plan: yolo

Reviewers: mark, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D4130
This commit is contained in:
Christine Spang 2017-03-07 18:03:26 -08:00
parent 0ccb2b51ad
commit bb18f98b83

View file

@ -118,6 +118,7 @@ export default class NylasAPIRequest {
async _notifyOfAPIError(apiError) {
const ignorableStatusCodes = [
0, // When errors like ETIMEDOUT, ECONNABORTED or ESOCKETTIMEDOUT occur from the client
401, // Don't report `Incorrect username or password`
404, // Don't report not-founds
408, // Timeout error code
429, // Too many requests