Revert "Upgrade to quart 0.15"

This reverts commit 486596f89f.
It was discovered that multipart/form-data forms do not work
correctly with Quart 0.15. The upgrade to Quart 0.15 was rushed
and not tested correctly, which I apologize for.

See-Also: https://github.com/pgjones/quart/issues/126
This commit is contained in:
Jonas Schäfer
2021-05-22 11:10:42 +02:00
parent 7f02746f63
commit b007afc901
6 changed files with 17 additions and 21 deletions

View File

@@ -17,7 +17,6 @@ from quart import (
redirect,
jsonify,
)
import werkzeug.exceptions
import environ
@@ -41,7 +40,7 @@ async def proc() -> typing.Dict[str, typing.Any]:
try:
user_info = await infra.client.get_user_info()
except (aiohttp.ClientError, werkzeug.exceptions.HTTPException):
except (aiohttp.ClientError, quart.exceptions.HTTPException):
user_info = {}
return {
@@ -106,16 +105,16 @@ async def backend_error_handler(exc: Exception) -> quart.Response:
async def generic_http_error(
exc: werkzeug.exceptions.HTTPException,
exc: quart.exceptions.HTTPException,
) -> quart.Response:
return quart.Response(
await render_template(
"generic_http_error.html",
status=exc.code,
status=exc.status_code,
description=exc.description,
name=exc.name,
),
status=exc.code,
status=exc.status_code,
)
@@ -199,7 +198,7 @@ def create_app() -> quart.Quart:
backend_error_handler,
)
app.register_error_handler(
werkzeug.exceptions.HTTPException,
quart.exceptions.HTTPException,
generic_http_error,
)
app.register_error_handler(