Skip to content
This repository was archived by the owner on Oct 13, 2023. It is now read-only.

Commit 24aaa7f

Browse files
committed
log error message when receiving an unexpected type error
Signed-off-by: tonic <[email protected]>
1 parent c09789c commit 24aaa7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

errdefs/http_helpers.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ func FromStatusCode(err error, statusCode int) error {
100100
err = System(err)
101101
}
102102
default:
103-
logrus.WithFields(logrus.Fields{
103+
logrus.WithError(err).WithFields(logrus.Fields{
104104
"module": "api",
105-
"status_code": fmt.Sprintf("%d", statusCode),
106-
}).Debugf("FIXME: Got an status-code for which error does not match any expected type!!!: %d", statusCode)
105+
"status_code": statusCode,
106+
}).Debug("FIXME: Got an status-code for which error does not match any expected type!!!")
107107

108108
switch {
109109
case statusCode >= 200 && statusCode < 400:

0 commit comments

Comments
 (0)