When using the comment text box to only apply a command, I'm falsely told to check my internet connection
Summary
Should applying a command to an issue fail, I'll be asked to check my internet connection... I received an HTTP422 which means my Internet connection is fine, but the UI thinks otherwise despite receiving an error message from GitLab.
Steps to reproduce
In my example, I was attempting to add a label to an issue where the label does not exist.
/label ~"Delivery team::Build"
Note the above is the only item in the comment box.
Because the label does not exist where I was attempting to use it, it's perfectly reasonable to not apply the label. In fact, GitLab will respond with an HTTP422 with the following response:
{commands_changes: null, valid: false,…}
commands_changes: null
errors: {commands_only: ["Failed to apply commands."], commands: ["Failed to apply commands."]}
valid: false
But this type of error is not indicative of a problem with my Internet connection.
What is the current bug behavior?
The UI asks me to check my internet connection:
Your comment could not be submitted! Please check your network connection and try again.
What is the expected correct behavior?
An error message that better describes why the comment couldn't be submitted would be a much better user experience. Something along the lines of:
The command you attempted failed to apply
Bonus points if we can tell the user why.
Output of checks
This bug happens on GitLab.com