Merge pull request #28944 from ping035627/ping035627-patch-0715

Automatic merge from submit-queue

Improve fatal error description for init in genericapiserver.go

When api.NewRequestContextFilter return error in the "init" function of genericapiserver.go, there are no handler info, add more information to indicate s.Handler or s.InsecureHandler, I suggest.
pull/6/head
k8s-merge-robot 2016-07-14 19:56:04 -07:00 committed by GitHub
commit e182520db6
1 changed files with 2 additions and 2 deletions

View File

@ -489,13 +489,13 @@ func (s *GenericAPIServer) init(c *Config) {
// After all wrapping is done, put a context filter around both handlers
if handler, err := api.NewRequestContextFilter(s.RequestContextMapper, s.Handler); err != nil {
glog.Fatalf("Could not initialize request context filter: %v", err)
glog.Fatalf("Could not initialize request context filter for s.Handler: %v", err)
} else {
s.Handler = handler
}
if handler, err := api.NewRequestContextFilter(s.RequestContextMapper, s.InsecureHandler); err != nil {
glog.Fatalf("Could not initialize request context filter: %v", err)
glog.Fatalf("Could not initialize request context filter for s.InsecureHandler: %v", err)
} else {
s.InsecureHandler = handler
}