fix(core): Remove excess args from routing error (#9377)

This commit is contained in:
Iván Ovejero 2024-05-17 10:47:03 +02:00 committed by GitHub
parent 9b2ce819d4
commit b1f977ebd0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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',
});
}
}