Tweak call stack depth to show more helpful error lines (#1333)
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
|||||||
|
|
||||||
func handleError(w http.ResponseWriter, status int, err error, keysAndValues ...interface{}) {
|
func handleError(w http.ResponseWriter, status int, err error, keysAndValues ...interface{}) {
|
||||||
keysAndValues = append(keysAndValues, "status", status)
|
keysAndValues = append(keysAndValues, "status", status)
|
||||||
logger.Warnw("error handling request", err, keysAndValues...)
|
logger.GetLogger().WithCallDepth(1).Warnw("error handling request", err, keysAndValues...)
|
||||||
w.WriteHeader(status)
|
w.WriteHeader(status)
|
||||||
_, _ = w.Write([]byte(err.Error()))
|
_, _ = w.Write([]byte(err.Error()))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user