rbt_mssql-pool-party
Version:
Extension of mssql that provides management of multiple connection pools, dsns, retries, and more
17 lines (14 loc) • 365 B
JavaScript
const { MSSQLError } = require('mssql');
export default class PoolError extends Error {
constructor(pool, err) {
super(err);
// clone the dsn and don't expose the password
if (pool && pool.dsn) {
this.dsn = { ...pool.dsn };
delete this.dsn.password;
}
if (err instanceof MSSQLError) {
Object.assign(this, err);
}
}
}