code: public void setResponse(JsonRpcResponse response) {
      if (response.isError()) {
        setException(response.error());
        return;
      }
  
      try {
        set((V) Messages.fromJson(method.outputBuilder(), response.result()));
      } catch (Exception e) {
        setException(e);
      }
    }
docs: Sets the JSON response of this promise.
  
  @param response the RPC response