prevent database error from crashing server
This commit is contained in:
parent
ce6a05ab66
commit
9496ec9b57
1 changed files with 2 additions and 0 deletions
|
|
@ -36,6 +36,8 @@ types.setTypeParser(types.builtins.INT8, (val) => Number(val));
|
||||||
dialect: new PostgresDialect({
|
dialect: new PostgresDialect({
|
||||||
pool: new Pool({
|
pool: new Pool({
|
||||||
connectionString: environmentService.getDatabaseURL(),
|
connectionString: environmentService.getDatabaseURL(),
|
||||||
|
}).on('error', (err) => {
|
||||||
|
console.error('Database error:', err.message);
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
plugins: [new CamelCasePlugin()],
|
plugins: [new CamelCasePlugin()],
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue