private static RequestException createBadQueryException(IllegalArgumentException e) {
        var cause = e.getCause() != null ? e.getCause() : e;
        return new RequestException(BAD_REQUEST, "URL violates RFC 2396: " + cause.getMessage(), cause);
    }
@author Simon Thoresen Hult
@author bjorncs
container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/HttpRequestFactory.java