fix(storage): make sure the storage initialization crashes when db connection can't be established
This commit is contained in:
parent
f6761fe434
commit
f8a5cc728d
3 changed files with 15 additions and 7 deletions
|
|
@ -171,6 +171,8 @@ export const createMysqlStorage = ({ table = defaultTable, connection }: MysqlSt
|
|||
async initializeStorage() {
|
||||
const pool = getPool(connection);
|
||||
|
||||
await pool.query('SELECT 1');
|
||||
|
||||
try {
|
||||
await initializeTable(pool, table);
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue