-
Notifications
You must be signed in to change notification settings - Fork 476
Open
Description
If an error is encountered in open, it is recast into a ConnectionError here: https://github.com/tediousjs/node-mssql/blob/master/lib/msnodesqlv8/connection-pool.js#L46
However, the constructor for ConnectionError expects (message, code), not (error) so when the error then bubbles up to the calling code, it looks like this:
conn err: ConnectionError: [object Object]
at PrivateConnection.callback2 (/Users/gavin/repos/node-core/collector/collector-server/node_modules/mssql/lib/msnodesqlv8/connection-pool.js:47:17)
at Immediate._onImmediate (/Users/gavin/repos/node-core/collector/collector-server/node_modules/msnodesqlv8/lib/connection.js:47:14)
at process.processImmediate (node:internal/timers:485:21) {
code: undefined
}
I have a simple fix which I will provide a PR for.
Metadata
Metadata
Assignees
Labels
No labels