Skip to content

Conversation

blva
Copy link
Collaborator

@blva blva commented Sep 19, 2025

Proposed changes

Adding an extra validation even though Atlas API already validates this.

Checklist

@blva blva marked this pull request as ready for review September 19, 2025 13:25
@blva blva requested a review from a team as a code owner September 19, 2025 13:25
@Copilot Copilot AI review requested due to automatic review settings September 19, 2025 13:25
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds client-side validation to ensure the Atlas API base URL uses HTTPS before attempting to validate credentials with the MongoDB Atlas API.

  • Adds HTTPS validation for apiBaseUrl in the server initialization process
  • Throws an error with a descriptive message if the URL doesn't start with "https://"
  • Provides early validation before making actual API calls to Atlas

src/server.ts Outdated
try {
if (!this.userConfig.apiBaseUrl.startsWith("https://")) {
const message =
"Failed to validate MongoDB Atlas the credentials from the config: API URL must be HTTPS";
Copy link

Copilot AI Sep 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar error in the error message. Remove 'the' before 'credentials' to fix: 'Failed to validate MongoDB Atlas credentials from the config: API URL must be HTTPS'

Copilot uses AI. Check for mistakes.

@blva blva merged commit c10955a into main Sep 19, 2025
16 of 17 checks passed
@blva blva deleted the MCP-184 branch September 19, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants