This commit is contained in:
2026-10-11 03:05:26 +07:00
parent 72ecdc0687
commit b733efe8e2
7 changed files with 96 additions and 6 deletions
+3
View File
@@ -16,5 +16,8 @@ func gameplayErrorStatus(err error, internalMessage string) error {
if errors.Is(err, gameplay_service.ErrGameNotFound) {
return status.Error(codes.NotFound, gameplay_service.ErrGameNotFound.Error())
}
if errors.Is(err, gameplay_service.ErrMovesNotAllowed) {
return status.Error(codes.FailedPrecondition, gameplay_service.ErrMovesNotAllowed.Error())
}
return status.Error(codes.Internal, internalMessage)
}