From 07a248c2ef817102a98e599422cf352dd906172f Mon Sep 17 00:00:00 2001 From: Heath Schaner Date: Wed, 24 Jan 2024 17:09:24 -0500 Subject: [PATCH] Client: Return reason from _handlePromiseError so it can be caught --- src/client/ClickHouseClient.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/client/ClickHouseClient.ts b/src/client/ClickHouseClient.ts index b959200..3da1bd7 100644 --- a/src/client/ClickHouseClient.ts +++ b/src/client/ClickHouseClient.ts @@ -124,8 +124,10 @@ export class ClickHouseClient { ) { if (reason && reason.response) { this.options.logger.error(reason.response.data); + return reason.response.data; } else { this.options.logger.error(reason); + return reason; } }