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 + } } }