Skip to content

Commit d83bb9c

Browse files
committed
throw an error
1 parent 3ff3af0 commit d83bb9c

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/tools/mongodb/metadata/explain.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,7 @@ export class ExplainTool extends MongoDBToolBase {
4747
const method = methods[0];
4848

4949
if (!method) {
50-
return {
51-
content: [
52-
{
53-
text: "No method provided. Expected one of the following: `aggregate`, `find`, or `count`",
54-
type: "text",
55-
},
56-
],
57-
};
50+
throw new Error("No method provided. Expected one of the following: `aggregate`, `find`, or `count`");
5851
}
5952

6053
let result: Document;

0 commit comments

Comments
 (0)