public Task <LazyLoadingDataSetResult <TItem> > GetTablePageData( RequestOptions requestOptions, IReadOnlyCollection <IFilterDefinition> filterDefinitions = null) { var dataUri = requestOptions.BuildUrl(); try { if (filterDefinitions != null && filterDefinitions.Any()) { return(httpClient.PostJsonAsync <LazyLoadingDataSetResult <TItem> >(dataUri, filterDefinitions)); } else { return(httpClient.GetJsonAsync <LazyLoadingDataSetResult <TItem> >(dataUri)); } } catch (Exception ex) { logger.LogError($"Error during fetching data from [{dataUri}]. Ex: {ex}"); var emptyResult = new LazyLoadingDataSetResult <TItem> { Items = Enumerable.Empty <TItem>().ToList() }; return(Task.FromResult(emptyResult)); } }