From a82be0ca33d1715d61e0250d0958b4da138c253a Mon Sep 17 00:00:00 2001 From: Alex Schwartz Date: Tue, 18 Nov 2025 06:57:51 -0500 Subject: [PATCH] fix: better rendering of ConnectionError --- lib/error/connection-error.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/error/connection-error.js b/lib/error/connection-error.js index 5a259b04..f19be2f5 100644 --- a/lib/error/connection-error.js +++ b/lib/error/connection-error.js @@ -18,6 +18,12 @@ class ConnectionError extends MSSQLError { super(message, code) this.name = 'ConnectionError' + + let err = message?.details + if (err instanceof Array && (err = err.at(-1))) { + this.message = err.message + this.originalError = err + } } }