public static void setPendingThrowable(ClientRequestContext ctx, Throwable cause) {
        requireNonNull(ctx, "ctx");
        requireNonNull(cause, "cause");
        cause = Exceptions.peel(cause);
        ctx.setAttr(CLIENT_PENDING_THROWABLE, cause);
    }
Sets a pending {@link Throwable} for the specified {@link ClientRequestContext}.
Note that the throwable will be peeled via {@link Exceptions#peel(Throwable)}
before being set.

<p>For example:<pre>{@code
final RuntimeException e = new RuntimeException();
final CompletionException wrapper = new CompletionException(e);
final ClientRequestContext ctx = ...
setPendingThrowable(ctx, wrapper);
final Throwable throwable = pendingThrowable(ctx);
assert throwable != null;
assertThat(throwable).isEqualTo(e);
}</pre>
core/src/main/java/com/linecorp/armeria/internal/client/ClientPendingThrowableUtil.java