diff --git a/server/internal/code.go b/server/internal/code.go index 102d49a9..e3f56e42 100644 --- a/server/internal/code.go +++ b/server/internal/code.go @@ -18,7 +18,7 @@ var ( codeErrProcessManifestFailed = NewCode("10100", "process manifest json failed") codeErrStartWorkerFailed = NewCode("10101", "start worker failed") - codeErrStopAppFailed = NewCode("10102", "stop worker failed") + codeErrStopWorkerFailed = NewCode("10102", "stop worker failed") ) func NewCode(code string, msg string) *Code { diff --git a/server/internal/http_server.go b/server/internal/http_server.go index cf49a94f..3158edd3 100644 --- a/server/internal/http_server.go +++ b/server/internal/http_server.go @@ -246,7 +246,7 @@ func (s *HttpServer) handlerStop(c *gin.Context) { worker := workers.Get(req.ChannelName).(*Worker) if err := worker.stop(req.RequestId, req.ChannelName); err != nil { slog.Error("handlerStop kill app failed", "err", err, "worker", workers.Get(req.ChannelName), "requestId", req.RequestId, logTag) - s.output(c, codeErrStopAppFailed, http.StatusInternalServerError) + s.output(c, codeErrStopWorkerFailed, http.StatusInternalServerError) return }