public async Task <HttpResponseMessage> GetStocks() { Response <GetStocksDto> httpResponse = new Response <GetStocksDto>(); try { httpResponse.RequestState = true; httpResponse.DataList = await _stockManager.GetStocks(); httpResponse.ErrorState = false; } catch (Exception ex) { httpResponse.ErrorState = true; httpResponse.ErrorList.Add(ex.Adapt <ApiException>()); } return(httpResponse); }