Tweak call stack depth to show more helpful error lines (#1333)

This commit is contained in:
David Zhao
2023-01-25 15:35:18 -08:00
committed by GitHub
parent 1bb9c8ad04
commit bd39a96eac
+1 -1
View File
@@ -9,7 +9,7 @@ import (
func handleError(w http.ResponseWriter, status int, err error, keysAndValues ...interface{}) {
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.Write([]byte(err.Error()))
}