code: private void handleAsyncCallback(final Response<Object> response, final Callback<Object> handler) {
          if (response.wasErrors()) {
              handler.onError(new Exception(response.body().toString()));
          } else {
              handler.accept(response.body());
          }
      }
docs: Handles an async callbackWithTimeout.