log error message when receiving an unexpected type error
Signed-off-by: tonic <tonicbupt@gmail.com>
This commit is contained in:
parent
c09789c114
commit
24aaa7f8c9
|
@ -100,10 +100,10 @@ func FromStatusCode(err error, statusCode int) error {
|
||||||
err = System(err)
|
err = System(err)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
logrus.WithFields(logrus.Fields{
|
logrus.WithError(err).WithFields(logrus.Fields{
|
||||||
"module": "api",
|
"module": "api",
|
||||||
"status_code": fmt.Sprintf("%d", statusCode),
|
"status_code": statusCode,
|
||||||
}).Debugf("FIXME: Got an status-code for which error does not match any expected type!!!: %d", statusCode)
|
}).Debug("FIXME: Got an status-code for which error does not match any expected type!!!")
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
case statusCode >= 200 && statusCode < 400:
|
case statusCode >= 200 && statusCode < 400:
|
||||||
|
|
Loading…
Reference in New Issue