Allow returning http errors with exceptions

before:
    def my_response_method(self):
        ...
        if error:
            return template, {'status'=400}

after:
    def my_response_method(self):
        ...
        if error:
            raise MyResponseError("bad thing happened")
where MyResponseError inherits from HTTPException
This commit is contained in:
Ilya Sukhanov 2014-04-15 21:15:33 -04:00
commit aa644b4340
2 changed files with 6 additions and 1 deletions

View file

@ -7,3 +7,4 @@ requests
sure<1.2.4
xmltodict
dicttoxml
werkzeug