Call connect manually to catch errors

Fix #372
This commit is contained in:
Ajay Ramachandran
2021-09-27 20:17:02 -04:00
parent 5f19d3ee09
commit 9d2c5ed74e

View File

@@ -56,7 +56,9 @@ export class Postgres implements IDatabase {
Logger.debug(`prepare (postgres): type: ${type}, query: ${query}, params: ${params}`);
try {
const queryResult = await this.pool.query({text: query, values: params});
const client = await this.pool.connect();
const queryResult = await client.query({text: query, values: params});
client.release();
switch (type) {
case "get": {