Skip to content

gitaly_client: Handle structuder errors in UserDeleteBranch

What does this MR do and why?

For some error conditions, the UserDeleteBranch RPC returns an OK error code and embeds the actual error that happened into the response via the pre_receive_error field. This pattern has been deprecated in Gitaly in favor of using structured errors.

Start handling structured UserDeleteBranchError errors to be prepared for this upcoming change. For now, the new behaviour matches the current behaviour so that we can first perform the migration to see whether it works as expected. We do have a lot more error information available now for specific errors though that we can start to make use of after the migration has concluded.

Part of gitaly#4212 (closed). The upstream change that introduced the new error is in gitaly!4604 (merged), whereas gitaly!4605 (merged) introduces the code that starts to return custom errors in Gitaly.

MR acceptance checklist

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

Merge request reports