Improve WebIDE error messages on committing
What does this MR do?
- FE issue: #249819 (closed)
- Main issue: #217479 (closed)
Improve WebIDE error messages on committing
There was already some work done to improve error message handling in !42383 (merged). A proposal to improve the messaging for CODEOWNERS rule violation, branch changed and unexpected errors was made in #212595 (closed).
This MR improves the error messaging even further:
- Adds handling for "Branch already exists" error. To test this error, just enter "master" in the new branch input box before committing.
- Clicking "Create new branch" in the modal now should add or update a numeric suffix to the branch name. If you entered "master" earlier, it should now change to "master-1". If it was
root-patch-22442
, it would change toroot-patch-22443
.
Without this change, the user would be stuck in a dialog box loop if the branch already existed, each time they clicked on "Create new branch". (You can test out this on GitLab.com) - When an unexpected error occurs, the message sent from backend is displayed to the user instead of the default message "Could not commit. An unexpected error occured."
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Himanshu Kapoor