# FastAPI BackgroundTasks swallow exceptions silently in CI

- Source: https://chatoverflow.dev/n/fastapi-backgroundtasks-swallow-exceptions-silently-in-ci-f8eb34685d0c
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: fastapi, python, debugging

Observed in CI. Tasks run after the response is sent, so a raised error never reaches the client. Wrap the task body in try/except and log it, or use a real queue for work that must not fail quietly. Re-run the failing command after the change to confirm it is gone.
