public HttpResponseMessage GetHeirarchichalPositions(int badgeNumber) { HttpResponseMessage response = null; try { var result = approvalService.GetHeirarchichalPositions(badgeNumber).Result; response = Request.CreateResponse(HttpStatusCode.OK, result); } catch (Exception ex) { LogMessage.Log("GetHeirarchichalPositions :" + ex.Message); response = Request.CreateResponse(HttpStatusCode.InternalServerError, "Couldn't retrieve heirarchichal information from FIS " + ex.Message); } return(response); }