mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-20 11:22:15 +00:00
refactor(core): Stop reporting to Sentry invalid credentials on workflow activation (no-changelog) (#9555)
This commit is contained in:
@@ -47,6 +47,7 @@ export class WorkflowActivationError extends ExecutionBaseError {
|
|||||||
'econnrefused', // Node.js
|
'econnrefused', // Node.js
|
||||||
'eauth', // OAuth
|
'eauth', // OAuth
|
||||||
'temporary authentication failure', // IMAP server
|
'temporary authentication failure', // IMAP server
|
||||||
|
'invalid credentials',
|
||||||
].some((str) => this.message.toLowerCase().includes(str))
|
].some((str) => this.message.toLowerCase().includes(str))
|
||||||
) {
|
) {
|
||||||
this.level = 'warning';
|
this.level = 'warning';
|
||||||
|
|||||||
@@ -18,12 +18,15 @@ describe('WorkflowActivationError', () => {
|
|||||||
expect(secondError.level).toBe('error');
|
expect(secondError.level).toBe('error');
|
||||||
});
|
});
|
||||||
|
|
||||||
test.each(['ETIMEDOUT', 'ECONNREFUSED', 'EAUTH', 'Temporary authentication failure'])(
|
test.each([
|
||||||
'should set `level` to `warning` for `%s`',
|
'ETIMEDOUT',
|
||||||
(code) => {
|
'ECONNREFUSED',
|
||||||
|
'EAUTH',
|
||||||
|
'Temporary authentication failure',
|
||||||
|
'Invalid credentials',
|
||||||
|
])('should set `level` to `warning` for `%s`', (code) => {
|
||||||
const error = new WorkflowActivationError(code, { cause });
|
const error = new WorkflowActivationError(code, { cause });
|
||||||
|
|
||||||
expect(error.level).toBe('warning');
|
expect(error.level).toBe('warning');
|
||||||
},
|
});
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user