Add text and json fallback error handlers (#1937)

* Add text and json fallback error handlers

* Add tests and auto-detect error fallback type
This commit is contained in:
Adam Hopkins
2020-09-30 15:11:27 +03:00
committed by GitHub
parent 0c4a9b1dce
commit 066df2c142
4 changed files with 397 additions and 97 deletions

View File

@@ -126,7 +126,7 @@ def test_app_handle_request_handler_is_none(app, monkeypatch):
def handler(request):
return text("test")
request, response = app.test_client.get("/test")
_, response = app.test_client.get("/test")
assert (
"'None' was returned while requesting a handler from the router"