public ActionResult GetInspectionDetailsByStateCodeByInspection(int stateCode, Guid inspectionId) { HttpClient httpClient = null; try { httpClient = GetHttpClient(); var inspections = InspectionService.QueryInspectionDetailsByStateCodeByInspection(httpClient, stateCode, inspectionId); return(Json(inspections, JsonRequestBehavior.AllowGet)); } catch (Exception ex) { LogService.LogMessage(httpClient, new Log() { Level = (int)LogType.Error, Name = ex.Message, FunctionName = this.GetType().Name + " | " + MethodBase.GetCurrentMethod().Name, Message = ex.InnerException != null ? ex.InnerException.Message : ex.Message }); return(Json(ex.Message, JsonRequestBehavior.AllowGet)); } }