throw error if query fails

This commit is contained in:
Ajay
2022-08-25 21:14:25 -04:00
parent 027ff694a0
commit cbf352173a

View File

@@ -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 {