Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,13 @@ export class Server {
// Validate API client credentials
if (this.userConfig.apiClientId && this.userConfig.apiClientSecret) {
try {
if (!this.userConfig.apiBaseUrl.startsWith("https://")) {
const message =
"Failed to validate MongoDB Atlas the credentials from config: apiBaseUrl must start with https://";
console.error(message);
throw new Error(message);
}

await this.session.apiClient.validateAccessToken();
} catch (error) {
if (this.userConfig.connectionString === undefined) {
Expand Down
Loading