Skip to content

Commit

Permalink
fix(Account): Don't compile logs for each error
Browse files Browse the repository at this point in the history
see #1677

Signed-off-by: Marcel Klehr <[email protected]>
  • Loading branch information
marcelklehr committed Jul 18, 2024
1 parent 90543e8 commit 1daa182
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/lib/Account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,20 +312,12 @@ export default class Account {
const message = await Account.stringifyError(e)
console.error('Syncing failed with', message)
Logger.log('Syncing failed with', message)
// send error to sentry
const logData = await Logger.anonymizeLogs(Logger.messages)
Sentry.setContext('accountData', {
...this.getData(),
username: 'SENSITIVEVALUEHIDDEN',
password: 'SENSITIVEVALUVALUEHIDDEN',
passphrase: 'SENSITIVEVALUVALUEHIDDEN'
})
if (!DEBUG) {
Sentry.getCurrentScope().addAttachment({
filename: 'floccus-log.txt',
data: logData.slice(-10).join('\n'),
})
}
if (e.list) {
Sentry.captureException(message)
} else {
Expand Down

0 comments on commit 1daa182

Please sign in to comment.