Changing user name: Empty flash message if user name exists
Summary
When a user tries to change their username/namespace to one that already exists, they get a red banner on top of the page but no error message. Given there is no error message, it's unclear to the individual why they cannot change their username and this leads to bad user experience.
Steps to reproduce
Go to User Settings > Account and attempt to change your namespace to one that already exists - either username or group.
What is the current bug behavior?
Red banner has no error message.
What is the expected correct behavior?
When a username cannot be updated because it's already taken by another user or group, add the following message to the existing red banner 'Username has already been taken'. We already have confirmation text when the change has gone through (below screenshot in blue). If the username cannot be changed because of another reason, display that reason. For any other issues, display: 'An unexpected error occurred.'
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Currently on: 11.1.0-rc4-ee aedb3c95