From 2cac8bb1c404f2424ccde926014d53a83d4eea9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20K=C3=B6nig?= <33655937+jkoenig134@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:45:29 +0100 Subject: [PATCH] The error message for an invalid baseUrl is misleading (#331) Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> --- src/CreateConnectorConfig.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/CreateConnectorConfig.ts b/src/CreateConnectorConfig.ts index 4241ef59..73e5457f 100644 --- a/src/CreateConnectorConfig.ts +++ b/src/CreateConnectorConfig.ts @@ -96,4 +96,10 @@ function validateConnectorConfig(connectorConfig: ConnectorRuntimeConfig): void } throw new Error(errorMessage); } + + if (!connectorConfig.transportLibrary.baseUrl.startsWith("http://") && !connectorConfig.transportLibrary.baseUrl.startsWith("https://")) { + // eslint-disable-next-line no-console + console.error("The 'transportLibrary.baseUrl' must either start with 'http://' or 'https://'."); + process.exit(1); + } }