code: private void handleResponseError(long requestId, Throwable error) {
      ContextualFuture future = futures.remove(requestId);
      if (future != null) {
        future.context.execute(() -> future.completeExceptionally(error));
      }
    }
docs: Handles a response error.