PLT-1572 Adding more info to the error message
Этот коммит содержится в:
@@ -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
|
||||
|
||||
Ссылка в новой задаче
Block a user