Catch postgres exceptions

Fix #338
This commit is contained in:
Ajay Ramachandran 2021-08-10 09:50:32 -04:00
parent f3e5b360c4
commit f24c962785

View file

@ -55,6 +55,7 @@ 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});
switch (type) {
@ -72,6 +73,9 @@ export class Postgres implements IDatabase {
break;
}
}
} catch (err) {
Logger.error(`prepare (postgres): ${err}`);
}
}
private async createDB() {