Skip to content

Commit 04b6f79

Browse files
authored
fix: db user test error (#187)
1 parent 597a9df commit 04b6f79

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
11
* @mongodb-js/mcp-server-developers
2-
**/atlas @blva @fmenezes
3-
**/mongodb @nirinchev @gagik

src/common/atlas/apiClientError.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ApiError } from "./openapi.js";
33
export class ApiClientError extends Error {
44
private constructor(
55
message: string,
6+
public readonly response: Response,
67
public readonly apiError?: ApiError
78
) {
89
super(message);
@@ -27,7 +28,11 @@ export class ApiClientError extends Error {
2728

2829
const apiError = typeof error === "object" && !(error instanceof Error) ? error : undefined;
2930

30-
return new ApiClientError(`[${response.status} ${response.statusText}] ${message}: ${errorMessage}`, apiError);
31+
return new ApiClientError(
32+
`[${response.status} ${response.statusText}] ${message}: ${errorMessage}`,
33+
response,
34+
apiError
35+
);
3136
}
3237

3338
private static async extractError(response: Response): Promise<ApiError | string | undefined> {

0 commit comments

Comments
 (0)