mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-21 02:56:40 -08:00
refactor(core): Prevent reporting to Sentry IMAP server error (no-changelog) (#9515)
This commit is contained in:
parent
1abb26e2da
commit
6ed9ef0b60
|
@ -41,7 +41,14 @@ export class WorkflowActivationError extends ExecutionBaseError {
|
|||
return;
|
||||
}
|
||||
|
||||
if (['ETIMEDOUT', 'ECONNREFUSED', 'EAUTH'].some((code) => this.message.includes(code))) {
|
||||
if (
|
||||
[
|
||||
'etimedout', // Node.js
|
||||
'econnrefused', // Node.js
|
||||
'eauth', // OAuth
|
||||
'temporary authentication failure', // IMAP server
|
||||
].some((str) => this.message.toLowerCase().includes(str))
|
||||
) {
|
||||
this.level = 'warning';
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -18,8 +18,8 @@ describe('WorkflowActivationError', () => {
|
|||
expect(secondError.level).toBe('error');
|
||||
});
|
||||
|
||||
test.each(['ETIMEDOUT', 'ECONNREFUSED', 'EAUTH'])(
|
||||
'should set `level` to `warning` for %s',
|
||||
test.each(['ETIMEDOUT', 'ECONNREFUSED', 'EAUTH', 'Temporary authentication failure'])(
|
||||
'should set `level` to `warning` for `%s`',
|
||||
(code) => {
|
||||
const error = new WorkflowActivationError(code, { cause });
|
||||
|
||||
|
|
Loading…
Reference in a new issue