Fix NoMethodError if the wiki repository raise an error
requested to merge gitlab-community/gitlab:467352-dcf-fix-nomethoderror-failures-because-matched_files-can-return-false into master
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA
What does this MR do and why?
This MR fixes the issue Follow-up from "Fix view wiki pages that contai... (#467352 - closed)
I see
NoMethodError
failures in the logs becausematched_files
can returnfalse
.
The root cause was in the method capture_git_error
which always returned false
when an exception was raised. The solution applied was to parameterize the returned value of capture_git_error
in cases of error.
Edited by 🤖 GitLab Bot 🤖