public async Task <ActionResult <List <PathModel> > > GetPathSearchBy([FromQuery] PathSearch pathSearch) { List <PathModel> paths = await _pathService.GetPathsBySearch(pathSearch); if (paths == null) { // Log.Warning("Couldn't find any paths in city {@pathSearchByCity}", pathSearch.City); throw new Exception($"Couldn't find any paths for search {pathSearch.searchByProperty}"); } Log.Information("succesfull to get paths in city {@pathSearchByCity}", paths); return(paths); }