id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 31239,Add a new exception type for request.GET and request.POST,Victor Porton,,"I believe we should throw a derived exception of `MultiValueDictKeyError` rather than `MultiValueDictKeyError` when a value is missing in `request.GET` or `request.POST`. This would add extra convenience when catching errors caused by a wrong request, easily distinguishing them with other errors (e.g. programmer's errors). I have in code of my custom View: {{{ def handle_exception(self, exc): if isinstance(exc, MultiValueDictKeyError) or isinstance(exc, KeyError): # It is an unwise assumption that this is necessarily missing HTTP param, # but rewriting it in other way would be time consuming (and maybe even more error prone). return MyErrorResponse({""code"": ""PAR_1"", ""message"": ""Missing param."", ""field"": exc.args[0]}) }}} You see, I did it wrong because of this missing feature. It would be too much work to do it right without relying on the suggested feature. Any code following good programming practices (namely Liskov substitution principle) won't be broken by this change.",New feature,closed,Error reporting,dev,Normal,wontfix,,,Unreviewed,0,0,0,0,0,0