microsoft / vscode-cosmosdb

Azure Databases extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-cosmosdb
MIT License
155 stars 68 forks source link

An error occurs after executing "Execute All" for the scrapbook #2228

Closed v-xinda closed 8 months ago

v-xinda commented 8 months ago

OS: Win10 Build Version: 20240110.1 Regression: Previous regression

Repro Steps:

  1. Create a Mongo DB account -> Create a database.
  2. Create a new scrapbook and type the following.
    db.test.drop()
    db.test.insertOne({"value":1})
    db.test.insertOne({"value":2, "age": 34})
    db.test.find()
  3. Click "Execute All".
  4. Check whether no error occurs.

Expect: No error occurs.

Actual: An error occurs. image

More Info:

  1. If you executed the above commands with the current released Azure Databases firstly, this issue doesn't reproduce when executing them again with the latest build.
  2. An error as below occurs when executing the first command db.test.drop(), but no error occurs after executing other commands. image
JasonYeMSFT commented 8 months ago

The error message indicates that the collection to drop doesn't exist. However, instead of getting the error in VS Code, I get this output file opened in the editor

image

@v-xinda Could you try executing the scripts after creating the "test" collection? If this error only occurs when attempting to delete a non-existent collection I think we can close this issue as won't fix.

v-xinda commented 8 months ago

@JasonYeMSFT This issue doesn't reproduce after creating the "test" collection.