diff --git a/backend/src/index.ts b/backend/src/index.ts index c138deba7..18ac9d9c1 100644 --- a/backend/src/index.ts +++ b/backend/src/index.ts @@ -26,8 +26,11 @@ const DB_VERSION = '0001-init_db' async function main() { // open mysql connection - const con = await connection() - if (!con.isConnected) { + let con = null + try { + con = await connection() + } catch (error) {} + if (!con || !con.isConnected) { throw new Error(`Couldn't open connection to database`) }