mirror of
https://github.com/docmost/docmost.git
synced 2025-11-13 04:32:41 +10:00
prevent database error from crashing server
This commit is contained in:
@ -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()],
|
||||||
|
|||||||
Reference in New Issue
Block a user