add callback with error handling
Signed-off-by: Joep Peeters <joep.peeters@nedap.com>
This commit is contained in:
@@ -42,7 +42,9 @@ export function createPgDatabaseClient(
|
||||
database.client.pool.on(
|
||||
'createSuccess',
|
||||
(_event: number, pgClient: Knex.Client) => {
|
||||
pgClient.query(`SET ROLE ${role}`, () => {});
|
||||
pgClient.query(`SET ROLE ${role}`, (err: Error, _res: any) => {
|
||||
if (err) throw err;
|
||||
});
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user