You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
text: `Unable to authenticate with MongoDB Atlas. Your API credentials may be invalid, expired or lack permissions. Please check your Atlas API credentials and ensure they have the appropriate permissions. For more information on setting up API keys, visit: https://www.mongodb.com/docs/atlas/configure-api-access/`,
31
+
},
32
+
],
33
+
isError: true,
34
+
};
35
+
}
36
+
37
+
if(statusCode===403){
38
+
return{
39
+
content: [
40
+
{
41
+
type: "text",
42
+
text: `You don't have sufficient permissions to perform this action in MongoDB Atlas. Please ensure your API key has the necessary roles assigned. For more information on Atlas API access roles, visit: https://www.mongodb.com/docs/atlas/api/service-accounts-overview/`,
43
+
},
44
+
],
45
+
isError: true,
46
+
};
47
+
}
48
+
49
+
if(statusCode===429){
50
+
return{
51
+
content: [
52
+
{
53
+
type: "text",
54
+
text: `MongoDB Atlas API rate limit exceeded. Please wait before making additional requests. For more information on rate limits, visit: https://www.mongodb.com/docs/atlas/api/#rate-limits`,
55
+
},
56
+
],
57
+
isError: true,
58
+
};
59
+
}
60
+
}
61
+
62
+
// For other types of errors, use the default error handling from the base class
63
+
returnsuper.handleError(error,args);
64
+
}
65
+
16
66
/**
17
67
*
18
68
* Resolves the tool metadata from the arguments passed to the tool
0 commit comments