def error_target
import bendvy-ecs-core@0.1.0.4/relation_reorder.bend as RelationReorderimport Base
import entity_key.bend as Key
import relation_types.bend as G
23def error_target(error:G.Error,parent:Key.Key) -> Key.Key:
24 match error:
25 case G.MissingChildEntity{_,child,_}: child
26 case G.DuplicateChild{_,child,_}: child
27 case G.ChildNotRelatedToParent{_,child,_}: child
28 case _: parent