public async Task <ActionResult <CoachResponse> > GetSpecificCoach(string coachSurname) { try { var searchedCoach = await _repository.GetSpecificCoach(coachSurname); var coachResponse = _mapper.Map <CoachResponse>(searchedCoach); _logger.LogInformation($"Coach has been downloaded."); return(Ok(coachResponse)); } catch (System.Exception ext) { _logger.LogError(ext, "Failed to download coach."); // TODO return error object with proper error code. return(BadRequest()); } }