1
1
mirror of https://github.com/n8n-io/n8n.git synced 2024-09-19 08:57:09 +03:00

refactor(core): Stop reporting to Sentry invalid credentials on workflow activation (no-changelog) (#9555)

This commit is contained in:
Iván Ovejero 2024-05-31 15:41:08 +02:00 committed by GitHub
parent 7fc00d8d10
commit 327794127e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 7 deletions

View File

@ -47,6 +47,7 @@ export class WorkflowActivationError extends ExecutionBaseError {
'econnrefused', // Node.js
'eauth', // OAuth
'temporary authentication failure', // IMAP server
'invalid credentials',
].some((str) => this.message.toLowerCase().includes(str))
) {
this.level = 'warning';

View File

@ -18,12 +18,15 @@ describe('WorkflowActivationError', () => {
expect(secondError.level).toBe('error');
});
test.each(['ETIMEDOUT', 'ECONNREFUSED', 'EAUTH', 'Temporary authentication failure'])(
'should set `level` to `warning` for `%s`',
(code) => {
const error = new WorkflowActivationError(code, { cause });
test.each([
'ETIMEDOUT',
'ECONNREFUSED',
'EAUTH',
'Temporary authentication failure',
'Invalid credentials',
])('should set `level` to `warning` for `%s`', (code) => {
const error = new WorkflowActivationError(code, { cause });
expect(error.level).toBe('warning');
},
);
expect(error.level).toBe('warning');
});
});