mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-01 02:25:45 +08:00
[client-app] Rate limit error reporting for message processing errors
Summary: This should prevent us from flooding Sentry with errors like this one: https://sentry.io/nylas/nylas-mail/issues/230605150/ Test Plan: manual Reviewers: spang, mark, halla, evan Reviewed By: evan Differential Revision: https://phab.nylas.com/D4151
This commit is contained in:
parent
521ca86efc
commit
20a05d3340
1 changed files with 6 additions and 1 deletions
|
@ -153,7 +153,12 @@ class MessageProcessor {
|
|||
desiredParts,
|
||||
})
|
||||
const fingerprint = ["{{ default }}", "message processor", err.message];
|
||||
NylasEnv.reportError(err, {fingerprint: fingerprint})
|
||||
NylasEnv.reportError(err, {fingerprint,
|
||||
rateLimit: {
|
||||
ratePerHour: 30,
|
||||
key: `MessageProcessorError:${err.message}`,
|
||||
},
|
||||
})
|
||||
|
||||
// Keep track of uids we failed to fetch
|
||||
const {failedUIDs = []} = folder.syncState
|
||||
|
|
Loading…
Reference in a new issue