diff --git a/pkg/apiserver/errors.go b/pkg/apiserver/errors.go index 5172ef303b9..460d57540e1 100644 --- a/pkg/apiserver/errors.go +++ b/pkg/apiserver/errors.go @@ -22,6 +22,7 @@ import ( "github.com/GoogleCloudPlatform/kubernetes/pkg/api" "github.com/GoogleCloudPlatform/kubernetes/pkg/tools" + "github.com/golang/glog" ) // statusError is an object that can be converted into an api.Status @@ -44,6 +45,11 @@ func errToAPIStatus(err error) *api.Status { case tools.IsEtcdTestFailed(err): status = http.StatusConflict } + // Log errors that were not converted to an error status + // by REST storage - these typically indicate programmer + // error by not using pkg/api/errors, or unexpected failure + // cases. + glog.V(1).Infof("An unchecked error was received: %v", err) return &api.Status{ Status: api.StatusFailure, Code: status,