From 5c1a6e27365bd7b7bb6549127dc5694e870e7dae Mon Sep 17 00:00:00 2001 From: jackmc Date: Thu, 28 Sep 2023 15:54:37 +0100 Subject: [PATCH] fix: conflict on user insert --- api/userapi/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/userapi/user.go b/api/userapi/user.go index 7af05c1..b36175a 100644 --- a/api/userapi/user.go +++ b/api/userapi/user.go @@ -183,7 +183,7 @@ func (h *UserHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { Warn("failed to create user") w.Write(utils.ToRAWJSON(api.HTTPError{Error: "user already exists"})) - w.WriteHeader(http.StatusBadRequest) + w.WriteHeader(http.StatusConflict) return }