@DELETE @Path("data/explore/queries/{id}") public void closeQuery(HttpRequest request, HttpResponder responder, @PathParam("id") String id) { try { QueryHandle handle = QueryHandle.fromId(id); if (!handle.equals(QueryHandle.NO_OP)) { exploreService.close(handle); } responder.sendStatus(HttpResponseStatus.OK); } catch (IllegalArgumentException e) { LOG.debug("Got exception:", e); responder.sendString(HttpResponseStatus.BAD_REQUEST, e.getMessage()); } catch (HandleNotFoundException e) { responder.sendStatus(HttpResponseStatus.NOT_FOUND); } catch (Throwable e) { LOG.error("Got exception:", e); responder.sendStatus(HttpResponseStatus.INTERNAL_SERVER_ERROR); } }