code: public static <T> Future<T> ofError(final Throwable error) {
          final CompletableFuture<T> cf = new CompletableFuture<>();
          cf.completeExceptionally(error);
  
          return Future.<T> of(cf);
      }
docs: Construct a completed-with-error Future from the given Exception
  
  @param error
  To wrap inside a Future
  @return Future containing supplied error