static <T extends RequestContext> T current() {
        final T ctx = currentOrNull();
        if (ctx == null) {
            throw new IllegalStateException(RequestContext.class.getSimpleName() + " unavailable");
        }
        return ctx;
    }
Returns the context of the {@link Request} that is being handled in the current thread.

@throws IllegalStateException if the context is unavailable in the current thread
core/src/main/java/com/linecorp/armeria/common/RequestContext.java