mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-08 12:37:00 +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
|
} while (this.isReadQuery(type) && tries < (lastPool === this.pool
|
||||||
? this.config.postgres.maxTries : this.config.postgresReadOnly.maxTries));
|
? 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 {
|
private getPool(type: string, options: QueryOption): Pool {
|
||||||
|
|||||||
Reference in New Issue
Block a user