public async Task <APIResponse> GetReview(int reviewId) { try { var client = httpClientFactory.CreateClient(VendorServiceOperation.serviceName); var response = await client.GetAsync(servicesConfig.Vendor + VendorServiceOperation.GetReview(reviewId)); if (response.IsSuccessStatusCode) { var reviews = JsonConvert.DeserializeObject <APIResponse>(await response.Content.ReadAsStringAsync()); return(new APIResponse(reviews, HttpStatusCode.OK)); } return(new APIResponse(response.StatusCode)); } catch (Exception ex) { logger.Error(ex, "Exception in method 'GetReview()'"); var exMessage = ex.InnerException != null ? ex.InnerException.Message : ex.Message; return(new APIResponse(exMessage, HttpStatusCode.InternalServerError)); } }