diff --git a/server/src/application/savePlayer.go b/server/src/application/savePlayer.go index 8a71c7f..3c8d9d7 100644 --- a/server/src/application/savePlayer.go +++ b/server/src/application/savePlayer.go @@ -53,12 +53,12 @@ func (app *Application) SavePlayer(usr *user.User, w http.ResponseWriter, r *htt func (app *Application) modifyUser(id string, gm *game.Game, name, authcode string) error { if usr, err := app.GetUserByAuthcode(authcode); err == nil && usr.GetId() != id { - return fmt.Errorf("authcode already in use") + return fmt.Errorf("%s authcode already in use", gm.GetId()) } modifyUser := app.users[id] if modifyUser.GetId() != id || modifyUser.GetGameId() != gm.GetId() { - return fmt.Errorf("couldn't find player %s in game %s", id, gm.GetId()) + return fmt.Errorf("%s couldn't find player %s in game", gm.GetId(), id) } modifyUser.SetName(name) modifyUser.SetAuthcode(authcode) @@ -71,7 +71,7 @@ func (app *Application) modifyUser(id string, gm *game.Game, name, authcode stri func (app *Application) createUser(gm *game.Game, name, authcode string) error { if _, err := app.GetUserByAuthcode(authcode); err == nil { - return fmt.Errorf("authcode already in use") + return fmt.Errorf("%s authcode already in use", gm.GetId()) } dirName := path.Join(app.config.DataDir, "users")