Skip to content

Commit

Permalink
fix: conflict on user insert
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmcguire1 committed Sep 28, 2023
1 parent 23b6ff7 commit 5c1a6e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/userapi/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 5c1a6e2

Please sign in to comment.