Skip to content

Commit

Permalink
Workaround in getConfig for deno deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
brookback committed Mar 18, 2024
1 parent de90230 commit fe355ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export const getConfig = <K extends keyof Config>(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;
Expand Down

0 comments on commit fe355ee

Please sign in to comment.