From 597983f3701970fd560b4270f64700b31d1c3317 Mon Sep 17 00:00:00 2001 From: Josh Moore Date: Sun, 16 Jul 2023 22:39:48 -0600 Subject: [PATCH] fix: unknown crash in prod? --- backend/app.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/app.ts b/backend/app.ts index 64e2b88..5408af8 100644 --- a/backend/app.ts +++ b/backend/app.ts @@ -65,7 +65,9 @@ async function main() { .catch((err) => (err.code && err.code === 'ENOENT' ? {} : console.error(err), resolve(void 0)))); // If user config is ready, try to configure SQL - if (UserConfig.ready && UserConfig.config.sql?.mySql != null) await MySql.configure(); + if (UserConfig.ready && UserConfig.config.sql?.mySql != null) + try { await MySql.configure(); } + catch (err) { throw new Error(`Failed to configure SQL`); } // Set up Express const app = express();