From 2d78299d8e176d6cdb06496a205d58da08be57e7 Mon Sep 17 00:00:00 2001 From: Tiago Barbosa Date: Wed, 14 Feb 2024 09:13:03 +0000 Subject: [PATCH] refactor: change start behavior on missing credentials Signed-off-by: Tiago Barbosa --- src/auth/auth.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/auth/auth.ts b/src/auth/auth.ts index ee04f94..bbb1be7 100644 --- a/src/auth/auth.ts +++ b/src/auth/auth.ts @@ -43,12 +43,10 @@ export async function loadAuthConfig(logger: Logger, config: Config) { if (!config.getOptional('pagerDuty.oauth')) { logger.error('No PagerDuty OAuth configuration found in config file.'); - throw new Error("No PagerDuty 'apiToken' or 'oauth' configuration found in config file."); } else if (!config.getOptionalString('pagerDuty.oauth.clientId') || !config.getOptionalString('pagerDuty.oauth.clientSecret') || !config.getOptionalString('pagerDuty.oauth.subDomain')) { logger.error("Missing required PagerDuty OAuth parameters in config file. 'clientId', 'clientSecret', and 'subDomain' are required. 'region' is optional."); - throw new Error('Missing required PagerDuty OAuth parameters in config file.'); } else { @@ -68,7 +66,6 @@ export async function loadAuthConfig(logger: Logger, config: Config) { } catch (error) { logger.error(`Unable to retrieve valid PagerDuty AUTH configuration from config file: ${error}`); - throw error; } }