1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #39526 from thaJeztah/errdefs_no_recurse

errdefs: remove unneeded recursive calls
This commit is contained in:
Brian Goff 2019-07-15 14:53:40 -07:00 committed by GitHub
commit 549e34c732
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,9 +136,6 @@ func statusCodeFromGRPCError(err error) int {
case codes.Unavailable: // code 14
return http.StatusServiceUnavailable
default:
if e, ok := err.(causer); ok {
return statusCodeFromGRPCError(e.Cause())
}
// codes.Canceled(1)
// codes.Unknown(2)
// codes.DeadlineExceeded(4)
@ -163,10 +160,6 @@ func statusCodeFromDistributionError(err error) int {
}
case errcode.ErrorCoder:
return errs.ErrorCode().Descriptor().HTTPStatusCode
default:
if e, ok := err.(causer); ok {
return statusCodeFromDistributionError(e.Cause())
}
}
return http.StatusInternalServerError
}