static <R> QueryResult<R> forFailure(
        final FailureReason failureReason,
        final String failureMessage) {

        return new FailedQueryResult<>(failureReason, failureMessage);
    }
Static factory method to create a result object for a failed query. Used by StateStores to
respond to a {@link StateStore#query(Query, PositionBound, QueryConfig)}.
streams/src/main/java/org/apache/kafka/streams/query/QueryResult.java