From fe355ee87346835a2a6ca6e9e2f37ed9c9d9c9c3 Mon Sep 17 00:00:00 2001 From: Johan Brook Date: Mon, 18 Mar 2024 22:31:09 +0100 Subject: [PATCH] Workaround in getConfig for deno deploy --- api/config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/config.ts b/api/config.ts index c308242b8..30414f403 100644 --- a/api/config.ts +++ b/api/config.ts @@ -13,8 +13,8 @@ export const getConfig = (key: K, def?: Config[K]): Conf if (!val) { if (def != null) return def; - console.error(`Config doesn't exist as env var: ${key}`); - Deno.exit(1); + // Cannot do Deno.exit(1) in Deno deploy? + throw new Error(`Config doesn't exist as env var: ${key}`); } return val;