public async Task <IActionResult> GetGameServerGroupLatestMatches([FromRoute] int startingIndex, [FromRoute] int pageSize, [FromRoute] Guid gameServerGroupPublicKey) { try { if (startingIndex < 0) { throw new ArgumentException($"Invalid starting index value ({startingIndex})", nameof(startingIndex)); } if (pageSize > this.maxPageSize) { throw new ArgumentException($"Maximum page size exceeded ({maxPageSize})", nameof(pageSize)); } var result = await service.GetGameServerGroupLatestMatches(startingIndex, pageSize, gameServerGroupPublicKey); if (result == null) { return(Error(new ErrorResult { Classification = ErrorClassification.EntityNotFound, Message = "Game server matches not found" }, HttpStatusCode.NotFound)); } return(Ok(result)); } catch (Exception) { return(Error(new ErrorResult { Classification = ErrorClassification.InternalError, Message = "Failed getting game server match statistics" })); } }