diff --git a/coderd/notifications.go b/coderd/notifications.go index 97cab982bd..812d8cd3e4 100644 --- a/coderd/notifications.go +++ b/coderd/notifications.go @@ -210,7 +210,7 @@ func (api *API) postTestNotification(rw http.ResponseWriter, r *http.Request) { return } - httpapi.Write(ctx, rw, http.StatusOK, nil) + rw.WriteHeader(http.StatusNoContent) } // @Summary Get user notification preferences diff --git a/codersdk/notifications.go b/codersdk/notifications.go index 560499a672..ac5fe8e60b 100644 --- a/codersdk/notifications.go +++ b/codersdk/notifications.go @@ -200,10 +200,9 @@ func (c *Client) PostTestNotification(ctx context.Context) error { } defer res.Body.Close() - if res.StatusCode != http.StatusOK { + if res.StatusCode != http.StatusNoContent { return ReadBodyAsError(res) } - return nil }