Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ConnectionAbortedError/asyncio.CancelledError when the page's loading is canceled by the user is not catchable. #230

Open
ignpoppyseed opened this issue Apr 17, 2023 · 1 comment

Comments

@ignpoppyseed
Copy link

The error ConnectionAbortedError is thrown if the page's loading is canceled. Using @app.errorhandler(ConnectionAbortedError) with an appropriate function is completely ignored. How do I handle (or just suppress) this error?

reproducible example:

from quart import Quart
from time import sleep
import asyncio

app = Quart(__name__)

@app.route('/')
async def hello():
    await asyncio.sleep(1)
    return 'Hello, world!'

if __name__ == '__main__':
    app.run()

reproduce the bug:
run the script. connect to localhost:5000. cancel the load when the page is loading.

traceback: https://pastebin.com/aueksHyg

this error should not be thrown (or there needs to be a way to catch it.)

Environment:

  • Python version: 3.11.2
  • Quart version: 0.18.4
@JerryHuang-LE
Copy link

not sure if it is the same issue with this one #266

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants