wilfred-s commented on a change in pull request #324:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/324#discussion_r737904996
##########
File path: pkg/plugin/admissioncontrollers/webhook/admission_controller.go
##########
@@ -311,10 +328,14 @@ func (c *admissionController) serve(w
http.ResponseWriter, r *http.Request) {
resp, err := json.Marshal(admissionReview)
if err != nil {
- http.Error(w, fmt.Sprintf("could not encode response: %v",
err), http.StatusInternalServerError)
+ errMessage := fmt.Sprintf("could not encode response: %v", err)
+ log.Logger().Error(errMessage)
+ http.Error(w, errMessage, http.StatusInternalServerError)
}
if _, err = w.Write(resp); err != nil {
- http.Error(w, fmt.Sprintf("could not write response: %v", err),
http.StatusInternalServerError)
+ errMessage := fmt.Sprintf("could not write response: %v", err)
+ log.Logger().Error(errMessage)
Review comment:
see above we need the sting in the http call
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]