Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zopyx opened this issue Oct 12, 2023 · 0 comments · Fixed by #517
Closed

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

zopyx opened this issue Oct 12, 2023 · 0 comments · Fixed by #517

Comments

@zopyx
Copy link
Member

zopyx commented Oct 12, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant