cubicweb #2793789 unique together errors not properly reported in the ui [resolved]

There is a faulty regex in source/ that assumes an '_idx' postfix on the IntegrityError base message. It may be absent because of a truncation issue. See "see also" ticket.


2013-04-05 11:16:18 - (cubicweb.web) ERROR: unexpected error while validating form
Traceback (most recent call last):
 File "/home/auc/confs/simulagora/cubicweb/web/views/", line 214, in _validate_form
 File "/home/auc/confs/simulagora/cubicweb/web/views/", line 120, in publish
 File "/home/auc/confs/simulagora/cubicweb/web/views/", line 138, in _default_publish
   eid = self.edit_entity(formparams)
 File "/home/auc/confs/simulagora/cubicweb/web/views/", line 214, in edit_entity
   entity.eid = self._insert_entity(etype, formparams['eid'], rqlquery)
 File "/home/auc/confs/simulagora/cubicweb/web/views/", line 164, in _insert_entity
   entity = self._cw.execute(rql, rqlquery.kwargs).get_entity(0, 0)
 File "/home/auc/confs/simulagora/cubicweb/", line 520, in execute
   build_descr=build_descr, **self._txid())
 File "/home/auc/confs/simulagora/cubicweb/server/", line 780, in execute
 File "/home/auc/confs/simulagora/cubicweb/server/", line 738, in execute
   results = plan.execute()
 File "/home/auc/confs/simulagora/cubicweb/server/", line 204, in execute
   result = step.execute()
 File "/home/auc/confs/simulagora/cubicweb/server/", line 505, in execute
   result = self.plan.insert_entity_defs()
 File "/home/auc/confs/simulagora/cubicweb/server/", line 555, in insert_entity_defs
   for edef in row])
 File "/home/auc/confs/simulagora/cubicweb/server/", line 1359, in glob_add_entity
   source.add_entity(session, entity)
 File "/home/auc/confs/simulagora/cubicweb/server/sources/", line 634, in add_entity
   self.doexec(session, sql, attrs)
 File "/home/auc/confs/simulagora/cubicweb/server/sources/", line 739, in doexec
   cursor.execute(str(query), args)
IntegrityError: duplicate key value violates unique constraint "unique_cw_versionedscript_cw_code_revision_cw_entry_file_path_c"
done in3.17.3
load left0.000
closed by#0f1504a9fb51 [constraint] more robust unicity constraint failures reporting for end-users
patchsource/native, entities/adapters: more robust unicity constraint failures reporting for end-users (closes #2793789) [applied]