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

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-04-03 18:37:22 +02:00
committed by GitHub
parent 69efde7a09
commit a260c05fa8
4 changed files with 49 additions and 43 deletions

View File

@@ -1321,7 +1321,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({