class AnalyticsResource {

    @POST
    @Path("/async")
    public AsyncDataToken runSyncAsync(final ActionRequest request) {
        try {
            return queryExecutor.executeAsync(request);
        } catch (QueryStoreException e) {
            logger.error(String.format("Error running async request %s", request), e);
            throw new WebApplicationException(
                    Response.serverError().entity(Collections.singletonMap("error", e.getMessage())).build());
        }
    }

    public  AnalyticsResource(QueryExecutor queryExecutor);

}