Skip to content

Commit

Permalink
Fix incorrect error handling to avoid panic. (#1988)
Browse files Browse the repository at this point in the history
  • Loading branch information
absoludity committed Sep 1, 2020
1 parent edd06a0 commit 6abe8f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/tiller-proxy/internal/handler/handler.go
Expand Up @@ -139,11 +139,11 @@ func (h *TillerProxy) RollbackRelease(w http.ResponseWriter, req *http.Request,
func (h *TillerProxy) UpgradeRelease(w http.ResponseWriter, req *http.Request, params handlerutil.Params) {
log.Printf("Upgrading Helm Release")
chartDetails, chartMulti, err := handlerutil.ParseAndGetChart(req, h.ChartClient, requireV1Support)
ch := chartMulti.Helm2Chart
if err != nil {
response.NewErrorResponse(handlerutil.ErrorCode(err), err.Error()).Write(w)
return
}
ch := chartMulti.Helm2Chart
manifest, err := h.ProxyClient.ResolveManifest(params["namespace"], chartDetails.Values, ch)
if err != nil {
response.NewErrorResponse(handlerutil.ErrorCode(err), err.Error()).Write(w)
Expand Down

0 comments on commit 6abe8f3

Please sign in to comment.