Merge pull request #442 from thaJeztah/19.03_backport_errdefs_no_recurse
[19.03 backport] errdefs: remove unneeded recursive calls
This commit is contained in:
commit
d2693998a6
1 changed files with 0 additions and 7 deletions
|
@ -141,9 +141,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)
|
||||
|
@ -168,10 +165,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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue