presto-main/src/main/java/io/prestosql/dispatcher/DispatchManager.java/DispatchManager/failQuery
class DispatchManager:    public void failQuery(QueryId queryId, Throwable cause)
    {
        requireNonNull(cause, "cause is null");

        queryTracker.tryGetQuery(queryId)
                .ifPresent(query -> query.fail(cause));
    }