File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
* @ mongodb-js/mcp-server-developers
2
- ** /atlas @ blva @ fmenezes
3
- ** /mongodb @ nirinchev @ gagik
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { ApiError } from "./openapi.js";
3
3
export class ApiClientError extends Error {
4
4
private constructor (
5
5
message : string ,
6
+ public readonly response : Response ,
6
7
public readonly apiError ?: ApiError
7
8
) {
8
9
super ( message ) ;
@@ -27,7 +28,11 @@ export class ApiClientError extends Error {
27
28
28
29
const apiError = typeof error === "object" && ! ( error instanceof Error ) ? error : undefined ;
29
30
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
+ ) ;
31
36
}
32
37
33
38
private static async extractError ( response : Response ) : Promise < ApiError | string | undefined > {
You can’t perform that action at this time.
0 commit comments