class ErrorUtils {

    public static <T> Mono<T> notFound(String message) {
        return Mono.error(() -> new NotFoundException(message));
    }

    @SafeVarargs
    public static boolean hasException(Throwable e, Class<? extends Throwable>... target) {<FILL_FUNCTION_BODY>}
}

        Throwable cause = e;
        while (cause != null) {
            for (Class<? extends Throwable> aClass : target) {
                if (aClass.isInstance(cause)) {
                    return true;
                }
            }
            cause = cause.getCause();
        }
        return false;
    
<no_super_class>