twilio/flask-restful — pull request #111 by dtheodor (2013-08-04 00:37:18+00:00)
Title: Allow exception propagation when app.propagate_exceptions is set

Added a check in `Api.handle_error` that propagates exceptions when `Flask.propagate_exceptions` is set. This honors the `app.testing` setting as established at http://flask.pocoo.org/docs/api/#flask.Flask.test_client that propagates exceptions instead of returning Flask responses. Otherwise behavior is inconsistent with Flask and testing is harder.

In general it would be nice to use Flask's error handlers instead of hacking a level above them, this would alleviate having to place another check (propagate_exceptions is already checked in flask). I am not sure if the handlers are
good enough to support wrapping all exceptions into json responses though.