public FailureReason getFailureReason() {
        throw new IllegalArgumentException(
            "Cannot get failure reason because this query did not fail."
        );
    }
If this partition failed to execute the query, returns the reason.

@throws IllegalArgumentException if this is not a failed result.
streams/src/main/java/org/apache/kafka/streams/query/internals/SucceededQueryResult.java