From a577a8631a46075a6fccf411a8e3c56f25cf52db Mon Sep 17 00:00:00 2001 From: Merrill Lines Date: Fri, 31 May 2024 17:43:02 -0700 Subject: [PATCH] update error message --- api/handlers/user.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/handlers/user.go b/api/handlers/user.go index 0b2cc46..7590580 100644 --- a/api/handlers/user.go +++ b/api/handlers/user.go @@ -125,7 +125,7 @@ func (u User) UserCreateHandler(w http.ResponseWriter, r *http.Request) { // check if the user already exists existingUser, _ := u.DB.FindOne(context.Background(), bson.M{"email": user.Email}) if existingUser != nil { - config.ErrorStatus("user already exists", http.StatusConflict, w, fmt.Errorf("duplicate email")) + config.ErrorStatus("email already exists", http.StatusConflict, w, fmt.Errorf("duplicate email")) return }