public IHttpActionResult SaveMedicalInformation([FromBody] MedicalInfoDTO medicalInfo, int contactId) { if (!ModelState.IsValid) { var errors = ModelState.Values.SelectMany(val => val.Errors).Aggregate("", (current, err) => current + err.Exception.Message); var dataError = new ApiErrorDto("Camper Medical Info Invalid", new InvalidOperationException("Invalid Camper Medical Data" + errors)); throw new HttpResponseException(dataError.HttpResponseMessage); } return(Authorized(token => { try { _campService.SaveCamperMedicalInfo(medicalInfo, contactId, token); return Ok(); } catch (Exception e) { var apiError = new ApiErrorDto("Camp Medical Info failed", e); throw new HttpResponseException(apiError.HttpResponseMessage); } })); }