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:
@@ -1,4 +1,5 @@
|
||||
import type { MigrationContext, ReversibleMigration } from '@db/types';
|
||||
import { ApplicationError } from 'n8n-workflow';
|
||||
|
||||
export class AddGlobalAdminRole1700571993961 implements ReversibleMigration {
|
||||
async up({ escape, runQuery }: MigrationContext) {
|
||||
@@ -39,7 +40,7 @@ export class AddGlobalAdminRole1700571993961 implements ReversibleMigration {
|
||||
|
||||
const memberRoleId = memberRoleIdResult[0]?.id;
|
||||
if (!memberRoleId) {
|
||||
throw new Error('Could not find global member role!');
|
||||
throw new ApplicationError('Could not find global member role!');
|
||||
}
|
||||
|
||||
await runQuery(
|
||||
|
||||
Reference in New Issue
Block a user