#30677: Improve Exception Message In Test Client when a None Value is provided 
to a
POST
--------------------------------------+------------------------------------
     Reporter:  Keith Gray            |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Testing framework     |                  Version:  2.2
     Severity:  Normal                |               Resolution:
     Keywords:  test client post      |             Triage Stage:  Accepted
    Has patch:  1                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------
Changes (by Markus Holtermann):

 * stage:  Unreviewed => Accepted


Comment:

 I like your suggestion. I would suggest a slightly different wording:
 {{{#!python
             raise TypeError(
                 "Cannot encode None for key '%s' as POST data. Did you
 mean "
                 "to pass an empty string or omit the value?" % key
             )
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30677#comment:2>
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 django-updates+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.58240b11367bcfcde4f510a8d1ac19b2%40djangoproject.com.

Reply via email to