Suppress internal errors in client output
Until recently, Gitaly was silently swallowing any errors returned by
SSH git upload-pack
processes. Clients would still receive stderr
output and a non-zero return code, but Gitlab-Shell would receive error
as nil and log success.
With gitaly!4173 (merged) Gitaly will now return an error when git fails, but this causes Gitlab-Shell to print out the GRPC error code as a message to the client:
fatal: couldn't find remote ref not-a-real-ref
fatal: the remote end hung up unexpectedly
remote:
remote:
========================================================================
remote:
remote: rpc error: code = Internal desc = SSHUploadPack: exit status 128
remote:
remote:
========================================================================
remote:
The remote:
text gives no additional context for the user and adds
clutter.
This MR suppresses the additional message added by Gitlab-Shell on
failure when the error type is Internal
, returning client output to
the format it was prior to the Gitaly change.
Edited by Will Chandler (ex-GitLab)