mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-08 12:37:00 +03:00
Don't crash on postgres errors
This commit is contained in:
@@ -21,6 +21,9 @@ export class Postgres implements IDatabase {
|
||||
|
||||
async init(): Promise<void> {
|
||||
this.pool = new Pool(this.config.postgres);
|
||||
this.pool.on("error", (err) => {
|
||||
Logger.error(err.stack);
|
||||
});
|
||||
|
||||
if (!this.config.readOnly) {
|
||||
if (this.config.createDbIfNotExists) {
|
||||
|
||||
Reference in New Issue
Block a user