Skip to content

Keep user_commit_files error messages consistent

Will Chandler (ex-GitLab) requested to merge wc/update-user-commit-errors into master

What does this MR do and why?

In !101958 (merged) we updated #user_commit_files to accept structured errors from Gitaly and output slightly different error messages for them. This has caused failures in spec/features/projects/files/user_creates_directory_spec.rb as it expected text 'A directory with this name already exists', while we were now returning 'Directory already exists'.

Update the error text for existing directories to match the expected wording, and do the same for files to keep things consistent.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Will Chandler (ex-GitLab)

Merge request reports