When parsing `AggregationPath` strings, if we hit an error, we throw `AggregationExecutionException`, which is a 500 class error.  But 500 class errors usually mean that retrying the request might improve the situation, where in this case we want to indicate that the user should not retry with the same request (they need to fix the path expression).  
server/src/main/java/org/elasticsearch/search/aggregations/support/AggregationPath.java
@Override
        public String toString() {
            return fullName;
        }
    }
    private final List<PathElement> pathElements;
    public AggregationPath(List<PathElement> tokens) {
        this.pathElements = tokens;
        if (tokens == null || tokens.size() == 0) {
            throw new IllegalArgumentException("Invalid path [" + this + "]");
        }
    }
    @Override
    public String toString() {
        return Strings.arrayToDelimitedString(pathElements.toArray(), AGG_DELIM);
    }
    public PathElement lastPathElement() {
        return pathElements.get(pathElements.size() - 1);
    }
    public List<PathElement> getPathElements() {
        return this.pathElements;
    }
    public List<String> getPathElementsAsStringList() {
        List<String> stringPathElements = new ArrayList<>();
        for (PathElement pathElement : this.pathElements) {
            stringPathElements.add(pathElement.name);
            if (pathElement.key != null) {
                stringPathElements.add(pathElement.key);
            }
            if (pathElement.metric != null) {