Skip to content

Log errors in User{Create,Update,Delete}Branch RPCs

Sami Hiltunen requested to merge smh-fix-branch-rpc-error-handling into master

UserCreateBranch, UserUpdateBranch and UserDeleteBranch do not log errors they are dropping in favor of alternative error messages. Some errors are also packed in to RPC responses. This causes the errors to look like successful responses which do not get logged by Gitaly's gRPC logging interceptor. These behaviors can make debugging difficult as it's not clear what was the original cause of the error. This MR addresses the situation by logging the swallowed errors.

Additionally, UserDeleteBranch and UserCreateBranch do not check currently if the error is a not found type error before responding so. This causes them to respond with a not found even if the error is something unrelated. This MR adds checks for the error types.

Related to gitlab#298838 (closed) where it's not clear from the logs what went wrong.

Edited by Sami Hiltunen

Merge request reports