Improve edit branch rules and squash options error handling
What does this MR do and why?
Improve edit branch rules and squash options error handling
- Expose messages returning from backend in the UI
- Add logic to capture errors in sentry
- Unify the error messages regarding squash options and wildcard branch
- Add translation to error message strings in
protected_branch.rbandsquash_options.rb
References
Screenshots or screen recordings
How to set up and validate locally
- Set up a protected branch with squash option with an exact branch name (e.g. main)
- Edit the target branch using wildcard selector
- Error alert should say
Squash option cannot be used with wildcard branch rules. Use an exact branch name
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #517472
Edited by Chaoyue Zhao
