Hi everybody, i'm currently working on my first django-application and stumbled upon a design issue, which i cant quite decide how to handle and i thought i may ask here, if there are any guidelines as to how to handle this :) In my view i have, naturally, some code to process the request and return a response. This code needs a get-parameter to operate within boundaries and this parameter is always provided within the application (Its an ajax-callback). The question now is, what to do if the parameter is not provided somehow. Should i catch the resulting KeyError (Or any unexpected exception in any view for that matter) and just redirect to a safe page, log the error away and display a warning to the user or should i just let the error pass (in debug show the error info page, in production the 500-page), since it shouldnt have happend within the application? I'm currently tending towards the second option, because in production there is the 500-page, so the user doesnt get to see ugly errors and with an error-handling middleware i can log the exceptions and in debug its easier to take care of the bug, but i like to hear some opinions from the more experienced django-devs in here, cause i'm sure im missing some vital point :D
Thanks&Grettings, Andre -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/bQyS-29Lb4QJ. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.