Be explicit about what violate a unicity constraint
E yams._exceptions.ValidationError: 8851:
E * identifier: identifier is part of violated unicity constraint
E * in_network: in_network is part of violated unicity constraint
E * : some relations violate a unicity constraint
When we use a utility function/method that create about 10 entities, that does not help a lot, especially if multiple entity types have identifier
and in_network
. In consequence, a better error message could be very useful.
- Does the message give the eid of the already saved entity or the eid of the entity not saved that violates the constraint? This should be clear with the message.
- The entity type should be given.
- The values that violate the constraint should be given.