#33936: BaseModelForm.save() ValueError lacks useful information
--------------------------------------+------------------------
Reporter: Josh Moore | Owner: nobody
Type: Bug | Status: new
Component: Forms | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 1
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
--------------------------------------+------------------------
We were hitting Airbrake errors in production where the only message
provided was "The <model> could not be changed because the data didn't
validate." This made it difficult to troubleshoot and debug the problem.
The error message would be more useful if it included information about
which specific form fields failed to validate and why.
I have prepared a patch which enhances the error message in the
BaseModelForm save() method by including the actual form errors in the
message, formatted as JSON.
This is my first time contributing to Django and using Trac, please
forgive any mistakes I made filling out this form.
--
Ticket URL: <https://code.djangoproject.com/ticket/33936>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070182ae6d3d27-9954df6e-c005-42a2-a898-41b2dc4e5496-000000%40eu-central-1.amazonses.com.