mirror of https://github.com/k3s-io/k3s
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
commit
e182520db6
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue