This commit is contained in:
2026-10-23 00:45:30 +07:00
parent 60119a07e8
commit 146700cf4c
34 changed files with 622 additions and 124 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package app
import (
"errors"
"evening_detective_server/internal/modules/team_qr_pdf"
"evening_detective_server/internal/services/game_service"
"evening_detective_server/internal/services/scenarios_service"
@@ -14,7 +15,7 @@ func gameErrorStatus(err error, internalMessage string) error {
switch {
case errors.Is(err, game_service.ErrGameNotFound), errors.Is(err, scenarios_service.ErrScenarioNotFound):
return status.Error(codes.NotFound, err.Error())
case errors.Is(err, game_service.ErrInvalidGameFormat):
case errors.Is(err, game_service.ErrInvalidGameFormat), errors.Is(err, team_qr_pdf.ErrInvalidWiFi):
return status.Error(codes.InvalidArgument, err.Error())
default:
return status.Error(codes.Internal, internalMessage)