Skip to content

Commit

Permalink
The error message for an invalid baseUrl is misleading (#331)
Browse files Browse the repository at this point in the history
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
jkoenig134 and mergify[bot] authored Dec 18, 2024
1 parent 61e5bc9 commit 2cac8bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/CreateConnectorConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 2cac8bb

Please sign in to comment.