mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-09 22:24:05 -08:00
fix(core): Remove excess args from routing error (#9377)
This commit is contained in:
parent
9b2ce819d4
commit
b1f977ebd0
|
@ -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';
|
||||
|
@ -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',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue