generated from VLADIMIR/template
up
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user