diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 4bf7d902..d68a96d3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1 @@ * @mongodb-js/mcp-server-developers -**/atlas @blva @fmenezes -**/mongodb @nirinchev @gagik diff --git a/.github/workflows/code_health_fork.yaml b/.github/workflows/code_health_fork.yaml index bf8c408e..5e3a7bd0 100644 --- a/.github/workflows/code_health_fork.yaml +++ b/.github/workflows/code_health_fork.yaml @@ -48,7 +48,7 @@ jobs: MDB_MCP_API_CLIENT_ID: ${{ secrets.TEST_ATLAS_CLIENT_ID }} MDB_MCP_API_CLIENT_SECRET: ${{ secrets.TEST_ATLAS_CLIENT_SECRET }} MDB_MCP_API_BASE_URL: ${{ vars.TEST_ATLAS_BASE_URL }} - run: npm test -- --testPathIgnorePatterns "tests/integration/tools/mongodb" --testPathIgnorePatterns "tests/integration/[^/]+\.ts" + run: npm test -- --testPathIgnorePatterns "tests/unit" --testPathIgnorePatterns "tests/integration/tools/mongodb" --testPathIgnorePatterns "tests/integration/[^/]+\.ts" - name: Upload test results uses: actions/upload-artifact@v4 if: always() diff --git a/src/common/atlas/apiClientError.ts b/src/common/atlas/apiClientError.ts index c445d4d4..baea7b57 100644 --- a/src/common/atlas/apiClientError.ts +++ b/src/common/atlas/apiClientError.ts @@ -3,6 +3,7 @@ import { ApiError } from "./openapi.js"; export class ApiClientError extends Error { private constructor( message: string, + public readonly response: Response, public readonly apiError?: ApiError ) { super(message); @@ -27,7 +28,11 @@ export class ApiClientError extends Error { const apiError = typeof error === "object" && !(error instanceof Error) ? error : undefined; - return new ApiClientError(`[${response.status} ${response.statusText}] ${message}: ${errorMessage}`, apiError); + return new ApiClientError( + `[${response.status} ${response.statusText}] ${message}: ${errorMessage}`, + response, + apiError + ); } private static async extractError(response: Response): Promise {