public void DepartureOrArrival(Plane Plane) { try { manager.DepartureOrArrival(Plane); } catch (Exception exc) { var resp = new HttpResponseMessage(HttpStatusCode.BadRequest) { Content = new StringContent(exc.Message) }; throw new HttpResponseException(resp); } }