diff --git a/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts b/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts index c2a255b43..af4eada7b 100644 --- a/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts @@ -1344,7 +1344,17 @@ export class HttpRequestV3 implements INodeType { const responseContentType = response.headers['content-type'] ?? ''; if (responseContentType.includes('application/json')) { responseFormat = 'json'; - response.body = jsonParse(Buffer.from(response.body).toString()); + const neverError = this.getNodeParameter( + 'options.response.response.neverError', + 0, + false, + ) as boolean; + const data = Buffer.from(response.body).toString(); + response.body = jsonParse(data, { + ...(neverError + ? { fallbackValue: {} } + : { errorMessage: 'Invalid JSON in response body' }), + }); } else if (binaryContentTypes.some((e) => responseContentType.includes(e))) { responseFormat = 'file'; } else {