From 456b7872a47aea135fbadf334e9ecf653712d48a Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 5 Jan 2016 08:54:39 -0600 Subject: PLT-1572 Adding more info to the error message --- store/sql_user_store.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'store') diff --git a/store/sql_user_store.go b/store/sql_user_store.go index 88c4f954b..e296b852b 100644 --- a/store/sql_user_store.go +++ b/store/sql_user_store.go @@ -330,7 +330,7 @@ func (us SqlUserStore) Get(id string) StoreChannel { if obj, err := us.GetReplica().Get(model.User{}, id); err != nil { result.Err = model.NewAppError("SqlUserStore.Get", "We encountered an error finding the account", "user_id="+id+", "+err.Error()) } else if obj == nil { - result.Err = model.NewAppError("SqlUserStore.Get", "We couldn't find the existing account", "user_id="+id) + result.Err = model.NewAppError("SqlUserStore.Get", "We couldn't find an existing account matching your email address for this team. This team may require an invite from the team owner to join.", "user_id="+id) } else { result.Data = obj.(*model.User) } @@ -435,7 +435,7 @@ func (us SqlUserStore) GetByEmail(teamId string, email string) StoreChannel { user := model.User{} if err := us.GetReplica().SelectOne(&user, "SELECT * FROM Users WHERE TeamId = :TeamId AND Email = :Email", map[string]interface{}{"TeamId": teamId, "Email": email}); err != nil { - result.Err = model.NewAppError("SqlUserStore.GetByEmail", "We couldn't find the existing account", "teamId="+teamId+", email="+email+", "+err.Error()) + result.Err = model.NewAppError("SqlUserStore.GetByEmail", "We couldn't find an existing account matching your email address for this team. This team may require an invite from the team owner to join.", "teamId="+teamId+", email="+email+", "+err.Error()) } result.Data = &user @@ -457,7 +457,7 @@ func (us SqlUserStore) GetByAuth(teamId string, authData string, authService str user := model.User{} if err := us.GetReplica().SelectOne(&user, "SELECT * FROM Users WHERE TeamId = :TeamId AND AuthData = :AuthData AND AuthService = :AuthService", map[string]interface{}{"TeamId": teamId, "AuthData": authData, "AuthService": authService}); err != nil { - result.Err = model.NewAppError("SqlUserStore.GetByAuth", "We couldn't find the existing account", "teamId="+teamId+", authData="+authData+", authService="+authService+", "+err.Error()) + result.Err = model.NewAppError("SqlUserStore.GetByAuth", "We couldn't find an existing account matching your authentication type for this team. This team may require an invite from the team owner to join.", "teamId="+teamId+", authData="+authData+", authService="+authService+", "+err.Error()) } result.Data = &user @@ -479,7 +479,7 @@ func (us SqlUserStore) GetByUsername(teamId string, username string) StoreChanne user := model.User{} if err := us.GetReplica().SelectOne(&user, "SELECT * FROM Users WHERE TeamId = :TeamId AND Username = :Username", map[string]interface{}{"TeamId": teamId, "Username": username}); err != nil { - result.Err = model.NewAppError("SqlUserStore.GetByUsername", "We couldn't find the existing account", "teamId="+teamId+", username="+username+", "+err.Error()) + result.Err = model.NewAppError("SqlUserStore.GetByUsername", "We couldn't find an existing account matching your username for this team. This team may require an invite from the team owner to join.", "teamId="+teamId+", username="+username+", "+err.Error()) } result.Data = &user -- cgit v1.2.3-1-g7c22