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,6 +1,10 @@
|
||||
import type Bull from 'bull';
|
||||
import { Service } from 'typedi';
|
||||
import type { ExecutionError, IExecuteResponsePromiseData } from 'n8n-workflow';
|
||||
import {
|
||||
ApplicationError,
|
||||
type ExecutionError,
|
||||
type IExecuteResponsePromiseData,
|
||||
} from 'n8n-workflow';
|
||||
import { ActiveExecutions } from '@/ActiveExecutions';
|
||||
import { decodeWebhookResponse } from '@/helpers/decodeWebhookResponse';
|
||||
|
||||
@@ -96,7 +100,7 @@ export class Queue {
|
||||
getBullObjectInstance(): JobQueue {
|
||||
if (this.jobQueue === undefined) {
|
||||
// if queue is not initialized yet throw an error, since we do not want to hand around an undefined queue
|
||||
throw new Error('Queue is not initialized yet!');
|
||||
throw new ApplicationError('Queue is not initialized yet!');
|
||||
}
|
||||
return this.jobQueue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user