1
0

fix: replace 59 bare except clauses with proper logging (#25)

All `except Exception:` now catch as `except Exception as exc:` with
appropriate logging (warning for critical paths, debug for graceful degradation).

Added logger setup to 4 files that lacked it:
- src/timmy/memory/vector_store.py
- src/dashboard/middleware/csrf.py
- src/dashboard/middleware/security_headers.py
- src/spark/memory.py

31 files changed across timmy core, dashboard, infrastructure, integrations.
Zero bare excepts remain. 1340 tests passing.
This commit is contained in:
2026-03-14 19:07:14 -04:00
parent b01c1cb582
commit fdc5b861ca
31 changed files with 131 additions and 70 deletions

View File

@@ -304,7 +304,8 @@ class CascadeRouter:
url = provider.url or "http://localhost:11434"
response = requests.get(f"{url}/api/tags", timeout=5)
return response.status_code == 200
except Exception:
except Exception as exc:
logger.debug("Ollama provider check error: %s", exc)
return False
elif provider.type == "airllm":