diff --git a/errors/errors.go b/errors/errors.go index 01a492d7f..2f561d075 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -75,7 +75,7 @@ func Code(err error) int { if err == nil { return 200 } - if se := FromError(err); err != nil { + if se := FromError(err); se != nil { return int(se.Code) } return UnknownCode @@ -84,7 +84,7 @@ func Code(err error) int { // Reason returns the reason for a particular error. // It supports wrapped errors. func Reason(err error) string { - if se := FromError(err); err != nil { + if se := FromError(err); se != nil { return se.Reason } return UnknownReason