wilfred-s commented on a change in pull request #324:
URL:
https://github.com/apache/incubator-yunikorn-k8shim/pull/324#discussion_r737904843
##########
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)
Review comment:
We need to build the errMessage anyway for the return in the
`http.Error` call so we have it might as well log it.
--
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]