Skip to content

Commit 8c2e1d1

Browse files
jankeromnesroboquat
authored andcommitted
[server] Make Stripe settings optional even when payment is enabled
1 parent 4431375 commit 8c2e1d1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

components/server/src/config.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,11 @@ export namespace ConfigFile {
217217
);
218218
let stripeSettings: { publishableKey: string; secretKey: string } | undefined;
219219
if (config.enablePayment && config.stripeSettingsFile) {
220-
stripeSettings = JSON.parse(fs.readFileSync(filePathTelepresenceAware(config.stripeSettingsFile), "utf-8"));
220+
try {
221+
stripeSettings = JSON.parse(fs.readFileSync(filePathTelepresenceAware(config.stripeSettingsFile), "utf-8"));
222+
} catch (error) {
223+
console.error("Could not load Stripe settings", error);
224+
}
221225
}
222226
let license = config.license;
223227
const licenseFile = config.licenseFile;

0 commit comments

Comments
 (0)