#35098: ValidationError is being converted into a 500 Internal Server Error
response
-----------------------------------+--------------------------------------
     Reporter:  Yawar Quadir Amin  |                    Owner:  (none)
         Type:  Bug                |                   Status:  closed
    Component:  Error reporting    |                  Version:  5.0
     Severity:  Normal             |               Resolution:  invalid
     Keywords:                     |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  1                  |                    UI/UX:  0
-----------------------------------+--------------------------------------

Comment (by Yawar Quadir Amin):

 Exceptions are not converted to anything if you raise them at a random
 place in your app.

 (a) It's not a random place, it's directly in the call stack of the URL
 route handler.

 (b) Is this documented? I'm looking at the recommended best practices:
 https://docs.djangoproject.com/en/5.0/ref/forms/validation/#raising-
 validation-error

 And it only shows you how to raise the error yourself. It doesn't say
 anything about raising it in a specific place?

-- 
Ticket URL: <https://code.djangoproject.com/ticket/35098#comment:4>
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/0107018cefe2e01e-fbd950c7-98e9-4b64-8f67-713137a59830-000000%40eu-central-1.amazonses.com.

Reply via email to