Sentry fix: Skip debug output from Mailsync

This commit is contained in:
Ben Gotow 2025-07-15 10:34:38 -05:00
parent 0beb5c789b
commit a729bbbbdf
2 changed files with 18 additions and 1 deletions

8
CLAUDE.md Normal file
View file

@ -0,0 +1,8 @@
# Claude Hooks
## after_edit
Run linting after making code changes to ensure code quality and style consistency.
```bash
npm run lint
```

View file

@ -305,7 +305,16 @@ export class MailsyncProcess extends EventEmitter {
let error = null;
let lastJSON = null;
try {
lastJSON = outBuffer.length && JSON.parse(outBuffer);
if (outBuffer.length) {
// Skip debug output that starts with 'dbg::' prefix
if (outBuffer.startsWith('dbg::')) {
console.log('Skipping debug output from mailsync:', outBuffer);
} else {
lastJSON = JSON.parse(outBuffer);
}
}
} catch (parseError) {
console.warn('Failed to parse mailsync output as JSON:', outBuffer);
} finally {
if (lastJSON) {
if (lastJSON.error) {