Description
My servers currently returns an error if you invoke the Organize Imports command on a file that has parse errors. However if I add this command to editor.codeActionsOnSave
in VS Code, this means anytime I press Save with an invalid file, I get a notification that the Organize Imports call fails.
If I change my server to return silently in this case (which we currently do for formatting), then if a user manually invokes the command, it would silently do nothing (perhaps due to an error that's not visible on-screen) and might seem like the command is not working.
It would be nice if we could tell when a command was triggered automatically so we can suppress the error response (or, if there were some guidelines to IDEs to do this automatically).