@defer.inlineCallbacks
    def errorEvent(self, header, connection_id, notification_id, timestamp, event, info, service_ex):

        # should mark sub connection as terminated / failed
        sub_conn = yield self.getSubConnection(header.provider_nsa, connection_id)

        conn = yield self.getConnectionByKey(sub_conn.service_connection_id)
        sub_conns = yield self.getSubConnectionsByConnectionKey(conn.id)

        if len(sub_conns) == 1:
            log.msg("errorEvent: One sub connection for connection %s, notifying" % conn.connection_id, system=LOG_SYSTEM)
            self.doErrorEvent(conn, notification_id, event, info, service_ex)
        else:
            raise NotImplementedError('Cannot handle errorEvent for connection with more than one sub connection')
dataset/ETHPy150Open NORDUnet/opennsa/opennsa/aggregator.py/Aggregator.errorEvent/original