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.
Files changed (2) hide show
  1. package/lib/mssql.js +2 -1
  2. 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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "db-crud-api",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "type": "module",
5
5
  "description": "CRUD api for database tables",
6
6
  "main": "index.js",