Skip to content

Commit

Permalink
fix(core): Remove excess args from routing error (n8n-io#9377)
Browse files Browse the repository at this point in the history
  • Loading branch information
ivov authored May 17, 2024
1 parent 9b2ce81 commit b1f977e
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions packages/workflow/src/RoutingNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import type {
import * as NodeHelpers from './NodeHelpers';

import type { Workflow } from './Workflow';
import type { NodeError } from './errors/abstract/node.error';

import { NodeOperationError } from './errors/node-operation.error';
import { NodeApiError } from './errors/node-api.error';
Expand Down Expand Up @@ -233,23 +232,9 @@ export class RoutingNode {
throw error;
}

interface AxiosError extends NodeError {
isAxiosError: boolean;
description: string | undefined;
response?: { status: number };
}

const routingError = error as AxiosError;

throw new NodeApiError(this.node, error as JsonObject, {
runIndex,
itemIndex: i,
message: routingError?.message,
description: routingError?.description,
httpCode:
routingError.isAxiosError && routingError.response
? String(routingError.response?.status)
: 'none',
});
}
}
Expand Down

0 comments on commit b1f977e

Please sign in to comment.