diff --git a/coderd/debug.go b/coderd/debug.go index 8f61bcfb78..d447de36ef 100644 --- a/coderd/debug.go +++ b/coderd/debug.go @@ -205,7 +205,8 @@ func (api *API) putDeploymentHealthSettings(rw http.ResponseWriter, r *http.Requ } if bytes.Equal(settingsJSON, []byte(currentSettingsJSON)) { - httpapi.Write(r.Context(), rw, http.StatusNotModified, nil) + // See: https://www.rfc-editor.org/rfc/rfc7231#section-6.3.5 + httpapi.Write(r.Context(), rw, http.StatusNoContent, nil) return } diff --git a/codersdk/health.go b/codersdk/health.go index b2a7b3de73..7367df902f 100644 --- a/codersdk/health.go +++ b/codersdk/health.go @@ -36,7 +36,7 @@ func (c *Client) PutHealthSettings(ctx context.Context, settings HealthSettings) } defer res.Body.Close() - if res.StatusCode == http.StatusNotModified { + if res.StatusCode == http.StatusNoContent { return xerrors.New("health settings not modified") } if res.StatusCode != http.StatusOK {