mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-06 11:36:58 +03:00
throw error if query fails
This commit is contained in:
@@ -141,6 +141,8 @@ export class Postgres implements IDatabase {
|
||||
}
|
||||
} while (this.isReadQuery(type) && tries < (lastPool === this.pool
|
||||
? this.config.postgres.maxTries : this.config.postgresReadOnly.maxTries));
|
||||
|
||||
throw new Error(`prepare (postgres): ${type} ${query} failed after ${tries} tries`);
|
||||
}
|
||||
|
||||
private getPool(type: string, options: QueryOption): Pool {
|
||||
|
||||
Reference in New Issue
Block a user