public IActionResult Read([FromQuery] ReadTimelineDto timelineDto) { ReadTimelineResponseDto responseDto = null; try { var timelineEntity = _timelineService.Read(timelineDto.TimelineId, _httpContextAccessor.GetCurrentUserId()); responseDto = _mapper.Map <ReadTimelineResponseDto>(timelineEntity); } catch (Exception ex) { Console.WriteLine($"Encountered exception while attempting to read timeline. Message: {ex.Message}"); Console.WriteLine(ex.StackTrace); return(BadRequest(new ErrorResponseDto(ex))); } return(Ok(responseDto)); }