From 65022666d7d35abc495eb5d64cd497c33fb694b0 Mon Sep 17 00:00:00 2001 From: adamdobos-seon Date: Wed, 4 Dec 2024 13:54:36 +0100 Subject: [PATCH] Add decompression error handling for failure responses --- packages/client-node/src/connection/node_base_connection.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/client-node/src/connection/node_base_connection.ts b/packages/client-node/src/connection/node_base_connection.ts index d17dfc8..eaf08f1 100644 --- a/packages/client-node/src/connection/node_base_connection.ts +++ b/packages/client-node/src/connection/node_base_connection.ts @@ -474,7 +474,11 @@ export abstract class NodeBaseConnection responseStream = _response } if (isFailedResponse) { - reject(parseError(await getAsText(responseStream))) + try { + reject(parseError(await getAsText(responseStream))) + } catch (err) { + reject(err) + } } else { return resolve({ stream: responseStream,