plone / plone.api

The Plone API
https://6.docs.plone.org/plone.api
Other
88 stars 53 forks source link

content.create() should provide better error message #516

Closed zopyx closed 1 year ago

zopyx commented 1 year ago

The error message here

https://github.com/plone/plone.api/blob/master/src/plone/api/content.py#L80-L89

should include the content_id and the path of the container in order to be more informative in case of migrations with spurious errors.

A better error message would be something like plone.api.exc.InvalidParameterError: Cannot add a 'newsletter' object with id=1-15-novembre to the container /magazine/segnalazioni/unibocultura/newsletter.

PR pending