Re: My proposal to create a new exception

2020-02-09 Thread Steven Mapes
Perhaps I'm totally missing the point and use case for this but is there any reason you are not simply using any of these if expected_key is not in request.GET: return MyErrorResponse(...) if not request.GET.get("expected_key", None): return MyErrorResponse(...) required = ["one", "two

Re: My proposal to create a new exception

2020-02-09 Thread Victor Porton
Just because your code repeated in each and every form can be eliminated and we can check it all in one place, shortening code, eliminating duplication, reducing possibilities of errors. On 09/02/2020 12:45, Steven Mapes wrote: Perhaps I'm totally missing the point and use case for this but is