Skip to content

Commit 3df78d5

Browse files
chore: fix isError property on listSearchIndexes tool with tests
1 parent a1e8b6d commit 3df78d5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/tools/mongodb/search/listSearchIndexes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ export class ListSearchIndexesTool extends MongoDBToolBase {
5555
{
5656
text: "This MongoDB cluster does not support Search Indexes. Make sure you are using an Atlas Cluster, either remotely in Atlas or using the Atlas Local image, or your cluster supports MongoDB Search.",
5757
type: "text",
58-
isError: true,
5958
},
6059
],
60+
isError: true,
6161
};
6262
}
6363
return super.handleError(error, args);

tests/integration/tools/mongodb/search/listSearchIndexes.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ describeWithMongoDB("list-search-indexes tool in local MongoDB", (integration) =
3232
arguments: { database: "any", collection: "foo" },
3333
});
3434
const content = getResponseContent(response.content);
35+
expect(response.isError).toBe(true);
3536
expect(content).toEqual(
3637
"This MongoDB cluster does not support Search Indexes. Make sure you are using an Atlas Cluster, either remotely in Atlas or using the Atlas Local image, or your cluster supports MongoDB Search."
3738
);

0 commit comments

Comments
 (0)