Skip to content

Commit

Permalink
Return correct error when lobby already exists (#81)
Browse files Browse the repository at this point in the history
Thanks to @Pedr0Rocha for spotting this.

Co-authored-by: Pedr0Rocha <pedrovqrocha@gmail.com>
  • Loading branch information
erikdubbelboer and Pedr0Rocha authored May 17, 2024
1 parent 9298e02 commit dcb5730
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/signaling/stores/postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (s *PostgresStore) CreateLobby(ctx context.Context, game, lobbyCode, peerID
return err
}
if res.RowsAffected() == 0 {
return ErrAlreadyInLobby
return ErrLobbyExists
}
return nil
}
Expand Down

0 comments on commit dcb5730

Please sign in to comment.