db-crud-api 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/mssql.js +2 -1
- package/package.json +1 -1
package/lib/mssql.js
CHANGED
|
@@ -72,7 +72,8 @@ export async function query(connection, dbOpes) {
|
|
|
72
72
|
let pool = pools[connection.id]; // Try to get an existing pool
|
|
73
73
|
if (!pool) {
|
|
74
74
|
pool = new sql.ConnectionPool(connection); // Create new pool
|
|
75
|
-
await pool.connect(); // wait that connection are made
|
|
75
|
+
try { await pool.connect(); // wait that connection are made
|
|
76
|
+
} catch(err) { throw(err); } // using original error
|
|
76
77
|
pools[connection.id] = pool; // add new pool to pools
|
|
77
78
|
}
|
|
78
79
|
|