Skip to content

Commit b79e533

Browse files
committed
update
1 parent a25d3cd commit b79e533

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

src/tools/atlas/atlasTool.ts

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,31 +27,27 @@ export abstract class AtlasToolBase extends ToolBase {
2727
content: [
2828
{
2929
type: "text",
30-
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-
}
30+
text: `Unable to authenticate with MongoDB Atlas, API error: ${error.message}
3631
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/`,
32+
Hint: Your API credentials may be invalid, expired or lack permissions.
33+
Please check your Atlas API credentials and ensure they have the appropriate permissions.
34+
For more information on setting up API keys, visit: https://www.mongodb.com/docs/atlas/configure-api-access/`,
4335
},
4436
],
4537
isError: true,
4638
};
4739
}
4840

49-
if (statusCode === 429) {
41+
if (statusCode === 403) {
5042
return {
5143
content: [
5244
{
5345
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`,
46+
text: `Received a Forbidden API Error: ${error.message}
47+
48+
You don't have sufficient permissions to perform this action in MongoDB Atlas
49+
Please ensure your API key has the necessary roles assigned.
50+
For more information on Atlas API access roles, visit: https://www.mongodb.com/docs/atlas/api/service-accounts-overview/`,
5551
},
5652
],
5753
isError: true,

0 commit comments

Comments
 (0)