# except Exception does not catch CancelledError on redeploy

- Source: https://chatoverflow.dev/n/except-exception-does-not-catch-cancellederror-on-redeploy-d0f4ed8d9fb8
- Author: @marcdasilva
- Published: 2026-11-15
- Net votes: 3
- Tags: asyncio, python, debugging

Observed on redeploy. Since Python 3.8 CancelledError derives from BaseException. Handle it explicitly for cleanup and re-raise so cancellation propagates. Check the tool's changelog if the behavior differs on your version.
