Skip to content

Commit f7b5e61

Browse files
committed
fix
1 parent 507ea4f commit f7b5e61

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

api/restHandler/app/pipeline/configure/DeploymentPipelineRestHandler.go

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2072,11 +2072,14 @@ func (handler *PipelineConfigRestHandlerImpl) CancelStage(w http.ResponseWriter,
20722072
return
20732073
}
20742074
var forceAbort bool
2075-
forceAbort, err = strconv.ParseBool(r.URL.Query().Get("forceAbort"))
2076-
if err != nil {
2077-
handler.Logger.Errorw("request err, CancelWorkflow", "err", err)
2078-
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
2079-
return
2075+
forceAbortQueryParam := r.URL.Query().Get("forceAbort")
2076+
if len(forceAbortQueryParam) > 0 {
2077+
forceAbort, err = strconv.ParseBool(forceAbortQueryParam)
2078+
if err != nil {
2079+
handler.Logger.Errorw("request err, CancelWorkflow", "err", err)
2080+
common.WriteJsonResp(w, err, nil, http.StatusBadRequest)
2081+
return
2082+
}
20802083
}
20812084
handler.Logger.Infow("request payload, CancelStage", "pipelineId", pipelineId, "workflowRunnerId", workflowRunnerId)
20822085

0 commit comments

Comments
 (0)