cubicweb #3217405 specific exception for unknown relation during entity creation [open]

>>> create_entity("Card", foo=-2)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/lib/python2.7/dist-packages/cubicweb/server/migractions.py", line 1378, in cmd_create_entity
    entity = self._cw.create_entity(etype, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cubicweb/req.py", line 153, in create_entity
    return cls.cw_instantiate(self.execute, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cubicweb/entity.py", line 533, in cw_instantiate
    rql, qargs, pendingrels, attrcache = cls._cw_build_entity_query(kwargs)
  File "/usr/lib/python2.7/dist-packages/cubicweb/entity.py", line 468, in _cw_build_entity_query
    assert eschema.has_relation(attr, role), '%s %s not found on %s' % (attr, role, eschema)
AssertionError: foo subject not found on Card

I would have excepted something more specific, easier to use within a try/except block in particular.

prioritynormal
typebug
done in<not specified>
closed by<not specified>