mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
refactor(core): Stop reporting to Sentry invalid credentials on workflow activation (no-changelog) (#9555)
This commit is contained in:
parent
7fc00d8d10
commit
327794127e
|
@ -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';
|
||||
|
|
|
@ -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');
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue