fix(core): Improve axios error handling in nodes (#5891)

This commit is contained in:
Jan Oberhauser
2023-04-01 19:03:12 +02:00
committed by कारतोफ्फेलस्क्रिप्ट™
parent 6d5c35d17f
commit f0a51a0b76
2 changed files with 2 additions and 2 deletions

View File

@@ -1310,7 +1310,7 @@ export class HttpRequestV3 implements INodeType {
if (autoDetectResponseFormat && response.reason.error instanceof Buffer) {
response.reason.error = Buffer.from(response.reason.error as Buffer).toString();
}
throw new NodeApiError(this.getNode(), response as JsonObject);
throw new NodeApiError(this.getNode(), response.reason as JsonObject);
} else {
// Return the actual reason as error
returnItems.push({