• Patrick Bajao's avatar
    Fix conflict resolve to handle FailedPrecondition error correctly · 4214e8b5
    Patrick Bajao authored
    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.
    
    Changelog: fixed
    4214e8b5
resolver.rb 1.91 KB