@Override
    public final void filter(DiscFilterRequest request, ResponseHandler handler) {
        filter(request)
                .ifPresent(errorResponse -> writeResponse(request, errorResponse, handler));
    }
A base class for {@link SecurityRequestFilter} implementations that renders an error response as JSON.

@author bjorncs
jdisc-security-filters/src/main/java/com/yahoo/jdisc/http/filter/security/base/JsonSecurityRequestFilterBase.java