presto-main/src/main/java/io/prestosql/dispatcher/LocalDispatchQuery.java/LocalDispatchQuery/getErrorCode
class LocalDispatchQuery:    @Override
    public Optional<ErrorCode> getErrorCode()
    {
        return stateMachine.getFailureInfo().map(ExecutionFailureInfo::getErrorCode);
    }