mirror of https://github.com/k3s-io/k3s
Merge pull request #1857 from deads2k/dev/deads/fixup-error-reporting
report originating error for GetReference failurepull/6/head
commit
34a64a270d
|
@ -34,7 +34,7 @@ func RecoverPanics(handler http.Handler) http.Handler {
|
|||
if x := recover(); x != nil {
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
fmt.Fprint(w, "apis panic. Look in log for details.")
|
||||
glog.Infof("APIServer panic'd on %v %v: %#v\n%s\n", req.Method, req.RequestURI, x, debug.Stack())
|
||||
glog.Infof("APIServer panic'd on %v %v: %v\n%s\n", req.Method, req.RequestURI, x, debug.Stack())
|
||||
}
|
||||
}()
|
||||
defer httplog.NewLogged(req, &w).StacktraceWhen(
|
||||
|
|
|
@ -99,7 +99,7 @@ var events = watch.NewMux(queueLen)
|
|||
func Event(object runtime.Object, fieldPath, status, reason, message string) {
|
||||
ref, err := api.GetReference(object)
|
||||
if err != nil {
|
||||
glog.Errorf("Could not construct reference to: %#v", object)
|
||||
glog.Errorf("Could not construct reference to: %#v due to: %v", object, err)
|
||||
return
|
||||
}
|
||||
ref.FieldPath = fieldPath
|
||||
|
|
Loading…
Reference in New Issue