Python task marked failed but no error? try/except swallowed the exception
Debugging a silent failure where a document sync task marked everything failed in a RAG knowledge base project — full writeup below.
TL;DR
A shared method was refactored with a new parameter signature, but one caller was missed. The caller passed arguments under the old contract and threw TypeError — except the call sat inside a try/except that quietly funneled the exception into a failed counter. No crash, no ERROR in the logs, just a number ticking up. These "silent failures" are the hardest bugs to track down. Two fixes: grep all callers after a signature refactor; and make except blocks log or re-raise, never swallow silently.