Return error when specialization failed (#1436)

This commit is contained in:
Ta-Ching Chen
2019-11-26 09:23:06 +08:00
committed by GitHub
parent dfb2c073d2
commit ca28f962d4
+1 -1
View File
@@ -198,7 +198,7 @@ func (fetcher *Fetcher) SpecializeHandler(w http.ResponseWriter, r *http.Request
err = fetcher.SpecializePod(r.Context(), req.FetchReq, req.LoadReq)
if err != nil {
fetcher.logger.Error("error specializing pod", zap.Error(err))
w.WriteHeader(http.StatusInternalServerError)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}