Create Merge Request button fails without clear error message
Summary
Given an issue with title longer than 255 characters, when a user clicks "Create merge request" on the issue page, it fails with an error message "Failed to create Merge Request. Please try again.".
Steps to reproduce
- Create an issue with title longer than 255 characters, for example: #268238 (closed)
- Click on "create merge request"
- Request would fail and flash message "Failed to create Merge Request. Please try again." appears.
- Retrying will not fix because the actual failure is due to long title.
- Inspecting the network requests reveals the backend error message is "{ title: {too long (maximum is 255 characters)} }"
Example Project
What is the current bug behavior?
Given an issue with title longer than 255 characters, when a user clicks "Create merge request" on the issue page, it fails with an error message "Failed to create Merge Request. Please try again.".
What is the expected correct behavior?
The error message should contain information that the title is too long, so it can be rectified. Otherwise, trying again will not work.
Relevant logs and/or screenshots
Output of checks
GitLab.com
Proposal
On the new merge request page, we should display the error being returned from the backend that the title is too long. If the merge request fails validation, backend should not be creating the branch.
Edited by Michelle Gill