summaryrefslogtreecommitdiffstats
path: root/store
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-01-05 08:54:39 -0600
committer=Corey Hulen <corey@hulen.com>2016-01-05 08:54:39 -0600
commit456b7872a47aea135fbadf334e9ecf653712d48a (patch)
treeaf117933cbc60ff1da569aa70e24ceac034c9dd6 /store
parenta35de266df1eb130572834ad31e3b8822284048c (diff)
downloadchat-456b7872a47aea135fbadf334e9ecf653712d48a.tar.gz
chat-456b7872a47aea135fbadf334e9ecf653712d48a.tar.bz2
chat-456b7872a47aea135fbadf334e9ecf653712d48a.zip
PLT-1572 Adding more info to the error message
Diffstat (limited to 'store')
-rw-r--r--store/sql_user_store.go8
1 files changed, 4 insertions, 4 deletions
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