From 0b149cd3496cd43e2116d657e95e6440039df18e Mon Sep 17 00:00:00 2001 From: Erik Dubbelboer Date: Fri, 17 May 2024 14:53:06 +0200 Subject: [PATCH] Return correct error when lobby already exists Co-authored-by: Pedr0Rocha --- internal/signaling/stores/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/signaling/stores/postgres.go b/internal/signaling/stores/postgres.go index 1387089..262cb6c 100644 --- a/internal/signaling/stores/postgres.go +++ b/internal/signaling/stores/postgres.go @@ -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 }