public HttpResponseMessage GetObjective(Guid id) { try { var objective = _objectiveService.GetObjectiveById(id); if (objective == null) { return(Request.CreateResponse(HttpStatusCode.NotFound)); } return(Request.CreateResponse(HttpStatusCode.OK, objective)); } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message)); } }