refactor(core): Move ApplicationError to @n8n/errors (#17667)

This commit is contained in:
Iván Ovejero
2025-07-28 17:48:56 +02:00
committed by GitHub
parent 6c0be292b1
commit 4cf9399432
59 changed files with 90 additions and 58 deletions

View File

@@ -27,6 +27,7 @@
"bin"
],
"devDependencies": {
"@n8n/errors": "workspace:^",
"@n8n/typescript-config": "workspace:*",
"@types/express": "catalog:",
"@types/jsonwebtoken": "catalog:",

View File

@@ -1,3 +1,3 @@
import { ApplicationError } from 'n8n-workflow';
import { ApplicationError } from '@n8n/errors';
export abstract class BinaryDataError extends ApplicationError {}

View File

@@ -1,4 +1,4 @@
import { ApplicationError } from 'n8n-workflow';
import { ApplicationError } from '@n8n/errors';
export abstract class FileSystemError extends ApplicationError {
constructor(message: string, filePath: string) {

View File

@@ -1,10 +1,10 @@
import { inTest, Logger } from '@n8n/backend-common';
import type { InstanceType } from '@n8n/constants';
import { Service } from '@n8n/di';
import type { ReportingOptions } from '@n8n/errors';
import type { NodeOptions } from '@sentry/node';
import type { ErrorEvent, EventHint } from '@sentry/types';
import { AxiosError } from 'axios';
import type { ReportingOptions } from 'n8n-workflow';
import { ApplicationError, ExecutionCancelledError, BaseError } from 'n8n-workflow';
import { createHash } from 'node:crypto';

View File

@@ -1,4 +1,4 @@
import { ApplicationError } from 'n8n-workflow';
import { ApplicationError } from '@n8n/errors';
export class InvalidExecutionMetadataError extends ApplicationError {
constructor(

View File

@@ -1,4 +1,4 @@
import { ApplicationError } from 'n8n-workflow';
import { ApplicationError } from '@n8n/errors';
import { CONFIG_MODES } from '../binary-data/utils';

View File

@@ -1,5 +1,5 @@
import { ApplicationError } from '@n8n/errors';
import { mock } from 'jest-mock-extended';
import { ApplicationError } from 'n8n-workflow';
import type {
Workflow,
INode,

View File

@@ -1,3 +1,4 @@
import { ApplicationError } from '@n8n/errors';
import { mock } from 'jest-mock-extended';
import type {
Expression,
@@ -13,7 +14,6 @@ import type {
WorkflowActivateMode,
WorkflowExecuteMode,
} from 'n8n-workflow';
import { ApplicationError } from 'n8n-workflow';
import { HookContext } from '../hook-context';

View File

@@ -1,3 +1,4 @@
import { ApplicationError } from '@n8n/errors';
import type {
ICredentialDataDecryptedObject,
INode,
@@ -9,7 +10,6 @@ import type {
IWebhookData,
WebhookType,
} from 'n8n-workflow';
import { ApplicationError } from 'n8n-workflow';
import { NodeExecutionContext } from './node-execution-context';
import { getRequestHelperFunctions } from './utils/request-helper-functions';

View File

@@ -1,5 +1,5 @@
import { ApplicationError } from '@n8n/errors';
import type { IBinaryData, INodeExecutionData } from 'n8n-workflow';
import { ApplicationError } from 'n8n-workflow';
import { normalizeItems } from '../normalize-items';

View File

@@ -1,5 +1,5 @@
import { ApplicationError } from '@n8n/errors';
import type { INodeExecutionData, IDataObject } from 'n8n-workflow';
import { ApplicationError } from 'n8n-workflow';
/**
* Automatically put the objects under a 'json' key and don't error,

View File

@@ -1,5 +1,5 @@
import { Service } from '@n8n/di';
import { ApplicationError } from 'n8n-workflow';
import { ApplicationError } from '@n8n/errors';
import type {
Workflow,
INode,