diff --git a/internals/daemon/api_changes.go b/internals/daemon/api_changes.go index 46e75d3c..962833b1 100644 --- a/internals/daemon/api_changes.go +++ b/internals/daemon/api_changes.go @@ -243,7 +243,7 @@ func v1PostChange(c *Command, r *http.Request, _ *UserState) Response { } if reqData.Action != "abort" { - return BadRequest("change action %q is unsupported", reqData.Action) + return BadRequest("invalid action %q", reqData.Action) } if chg.Status().Ready() { diff --git a/internals/daemon/api_checks.go b/internals/daemon/api_checks.go index 845016d3..53814577 100644 --- a/internals/daemon/api_checks.go +++ b/internals/daemon/api_checks.go @@ -89,7 +89,7 @@ func v1PostChecks(c *Command, r *http.Request, _ *UserState) Response { } default: if len(payload.Checks) == 0 { - return BadRequest("no checks to %s provided", payload.Action) + return BadRequest("must specify checks for %s action", payload.Action) } } @@ -104,7 +104,7 @@ func v1PostChecks(c *Command, r *http.Request, _ *UserState) Response { case "stop": checks, err = checkmgr.StopChecks(plan, payload.Checks) default: - return BadRequest("action %q is unsupported", payload.Action) + return BadRequest("invalid action %q", payload.Action) } if err != nil { return BadRequest("cannot %s checks: %v", payload.Action, err) diff --git a/internals/daemon/api_services.go b/internals/daemon/api_services.go index dfc045c6..86d5a887 100644 --- a/internals/daemon/api_services.go +++ b/internals/daemon/api_services.go @@ -95,7 +95,7 @@ func v1PostServices(c *Command, r *http.Request, _ *UserState) Response { payload.Services = services default: if len(payload.Services) == 0 { - return BadRequest("no services to %s provided", payload.Action) + return BadRequest("must specify services for %s action", payload.Action) } } @@ -182,7 +182,7 @@ func v1PostServices(c *Command, r *http.Request, _ *UserState) Response { sort.Strings(services) payload.Services = services default: - return BadRequest("action %q is unsupported", payload.Action) + return BadRequest("invalid action %q", payload.Action) } if err != nil { return BadRequest("cannot %s services: %v", payload.Action, err)