Skip to content

Conversation

@gagik
Copy link
Contributor

@gagik gagik commented Oct 15, 2024

test> response = db.test.dropIndex({"a": 1});
MongoshInternalError: can't find index with key: { a: 1 }

test> console.info(response);
{
  ok: 0,
  errmsg: "can't find index with key: { a: 1 }",
  code: 27,
  codeName: 'IndexNotFound'
}

mongosh seems to throw the error here instead of the dropIndex request going to the server. Hence response variable doesn't end up being set.

@gagik gagik merged commit 15faeba into main Oct 18, 2024
2 checks passed
@gagik gagik deleted the gagik/dropindex-throw-error branch October 18, 2024 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants