public static void hook(Function<? super RequestContextStorage, ? extends RequestContextStorage> function) {
        final RequestContextStorage newStorage = function.apply(requestContextStorage);
        checkState(newStorage != null, "function.apply() returned null: %s", function);
        requestContextStorage = newStorage;
    }
Returns an {@link IllegalStateException} which is raised when popping a context from
the unexpected thread or forgetting to close the previous context.
core/src/main/java/com/linecorp/armeria/internal/common/RequestContextUtil.java