The error ConnectionAbortedError
is thrown if the page's loading is canceled when using a Python3 Quart webserver. Using @app.errorhandler(ConnectionAbortedError)
with an appropriate function is completely ignored. How do I handle this error?
Edit - Minimal reproducible example:
import time, asyncio
from quart import Quart
app = Quart(__name__)
@app.route('/')
async def send_to_channel():
time.sleep(1)
return 'hi'
asyncio.run(app.run_task('0.0.0.0', port=3000))