diff --git a/src/databases/Postgres.ts b/src/databases/Postgres.ts index 35d9eaa..ff97c6f 100644 --- a/src/databases/Postgres.ts +++ b/src/databases/Postgres.ts @@ -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 {