Commit 34a64a27 authored by Daniel Smith's avatar Daniel Smith

Merge pull request #1857 from deads2k/dev/deads/fixup-error-reporting

report originating error for GetReference failure
parents ea3d3c06 2c35c067
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment