Fix conflict resolver to handle FailedPrecondition error correctly
What does this MR do?
Before this change, Gitlab::Git::Conflict::Resolver#conflicts
is meant to rescue GRPC::FailedPrecondition
exception and re-raise Gitlab::Git::Conflict::Resolver::ConflictSideMissing
.
That wasn't working though as wrapped_gitaly_errors
will rescue it as a GRPC::BadStatus
exception because that's the parent of GRPC::FailedPrecondition
.
That results to MR head diff not showing up when there are conflicts with missing side.
This fix moves the rescue inside the wrapped_gitaly_errors
block so we can rescue appropriately.
Does this MR meet the acceptance criteria?
Conformity
-
I have included a changelog entry, or it's not needed. (Does this MR need a changelog?) -
I have properly separated EE content from FOSS, or this MR is FOSS only. (Where should EE code go?) -
I have self-reviewed this MR per code review guidelines. -
This MR does not harm performance, or I have asked a reviewer to help assess the performance impact. (Merge request performance guidelines) -
I have followed the style guides.
Availability and Testing
-
I have added/updated tests following the Testing Guide, or it's not needed. (Consider all test levels. See the Test Planning Process.)
Related to #281162 (closed)
Edited by Patrick Bajao