mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(core): Switch plain errors in cli to ApplicationError (#7857)
Ensure all errors in `cli` are `ApplicationError` or children of it and contain no variables in the message, to continue normalizing all the errors we report to Sentry Follow-up to: https://github.com/n8n-io/n8n/pull/7839
This commit is contained in:
@@ -6,6 +6,7 @@ import { Container, Service } from 'typedi';
|
||||
import config from '@/config';
|
||||
import type { InviteEmailData, PasswordResetData, SendEmailResult } from './Interfaces';
|
||||
import { NodeMailer } from './NodeMailer';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
|
||||
type Template = HandlebarsTemplateDelegate<unknown>;
|
||||
type TemplateName = 'invite' | 'passwordReset';
|
||||
@@ -50,7 +51,7 @@ export class UserManagementMailer {
|
||||
}
|
||||
|
||||
async verifyConnection(): Promise<void> {
|
||||
if (!this.mailer) throw new Error('No mailer configured.');
|
||||
if (!this.mailer) throw new ApplicationError('No mailer configured.');
|
||||
|
||||
return this.mailer.verifyConnection();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user