statushandler: Don't wrap context errors
When returning a structerr
, we will check for wrapped errors and
return the inner gRPC code when present. However, with context errors we
want ensure that the Canceled
/DeadlineExceeded
statuses override any
previous generated codes.
Wrapping the errors caused elevated error rates on InfoRefsUploadPack
as the inner error of canceled processes was Internal
, triggering incident #8566.
Use '%v' in our format strings for context-related errors so that we return the expected status.
Edited by Will Chandler