[BUGFIX] Only log "reference code" of Flow exceptions

The ``getReferenceCode()`` method does not exist in the base
exception.