mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-09 20:17:41 +00:00
report originating error for GetReference failure
This commit is contained in:
parent
b01126322b
commit
2c35c06727
@ -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
Block a user