private static SearchResponse createErrorResponse(final QueryKey queryKey,
                                                      final ResultStore store,
                                                      final Throwable throwable) {
        Objects.requireNonNull(store);
        Objects.requireNonNull(throwable);

        final List<String> errors = new ArrayList<>();

        LOGGER.debug(throwable::getMessage, throwable);
        errors.add(ExceptionStringUtil.getMessage(throwable));

        if (store.getErrors() != null) {
            errors.addAll(store.getErrors());
        }
        return new SearchResponse(
                queryKey,
                null,
                null,
                errors,
                false);
    }
@param throwable List of errors to add to the {@link SearchResponse}
@return An empty {@link SearchResponse} with the passed error messages
stroom-query/stroom-query-common/src/main/java/stroom/query/common/v2/SearchResponseCreator.java