Transition to structured errors for RawBlame (step 1)
What does this MR do and why?
Contributes to #425441 (closed)
Problem
Gitaly code has changed and started to return GRPC::Internal
error for
cases when blame range is out-of-range. It was patched in
!131638 (merged).
The new version of Gitaly returns an GRPC::InvalidArgument
error: gitaly!6414 (merged).
That breaks an automatic Gitaly update: !132756 (closed)
Solution
Adapt Rails code to handle new type of error without exceptions.
How to set up and validate locally
- Visit http://127.0.0.1:3000/api/v4/projects/2/repository/files/README.md/blame?ref=master&range%5Bstart%5D=999&range%5Bend%5D=1000
- You should see an empty array in the response
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vasilii Iakliushin