Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: add logging to silent except blocks across codebase (#3195)

LearningCircuit0f03def604a8
diff --git a/src/local_deep_research/database/backup/backup_service.py b/src/local_deep_research/database/backup/backup_service.py
index fdabc7b678..0b4f939e44 100644
--- a/src/local_deep_research/database/backup/backup_service.py
+++ b/src/local_deep_research/database/backup/backup_service.py
@@ -535,4 +535,5 @@ class BackupService:
]
return backups[0] if backups else None
except Exception:
+ logger.exception("Error finding latest backup")
return None
diff --git a/src/local_deep_research/database/sqlcipher_utils.py b/src/local_deep_research/database/sqlcipher_utils.py
index a19234343b..aabfaa5268 100644
--- a/src/local_deep_research/database/sqlcipher_utils.py
+++ b/src/local_deep_research/database/sqlcipher_utils.py
@@ -497,6 +497,7 @@ def get_sqlcipher_version(cursor_or_conn: Any) -> Optional[str]:
result = cursor_or_conn.fetchone()
return result[0] if result else None
except Exception:
+ logger.debug("Could not query SQLCipher version", exc_info=True)
return None
diff --git a/src/local_deep_research/database/thread_local_session.py b/src/local_deep_research/database/thread_local_session.py
index 36125650c1..32da527419 100644
--- a/src/local_deep_research/database/thread_local_session.py
+++ b/src/local_deep_research/database/thread_local_session.py
@@ -227,11 +227,11 @@ def cleanup_dead_threads():
try:
db_manager.maybe_sweep_dead_engines()
except Exception:
- logger.debug("Dead-thread engine sweep failed", exc_info=True)
+ logger.warning("Dead-thread engine sweep failed")
try:
thread_session_manager.cleanup_dead_threads()
except Exception:
- logger.debug("Dead-thread session sweep failed", exc_info=True)
+ logger.warning("Dead-thread session sweep failed")
class _ThreadCleanup(ContextDecorator):
diff --git a/src/local_deep_research/domain_classifier/classifier.py b/src/local_deep_research/domain_classifier/classifier.py
index d345554c29..6148a11476 100644
--- a/src/local_deep_research/domain_classifier/classifier.py
+++ b/src/local_deep_research/domain_classifier/classifier.py
@@ -304,6 +304,7 @@ JSON Response:"""
if domain:
domains.add(domain)
except (ValueError, AttributeError):
+ logger.debug("Skipping malformed URL")
continue
results["total"] = len(domains)
diff --git a/src/local_deep_research/embeddings/providers/implementations/openai.py b/src/local_deep_research/embeddings/providers/implementations/openai.py
index d071a055bd..ac92321aed 100644
--- a/src/local_deep_research/embeddings/providers/implementations/openai.py
+++ b/src/local_deep_research/embeddings/providers/implementations/openai.py
@@ -118,6 +118,9 @@ class OpenAIEmbeddingsProvider(BaseEmbeddingProvider):
)
return bool(api_key)
except Exception:
+ logger.debug(
+ "Error checking OpenAI embedding availability", exc_info=True
+ )
return False
@classmethod
diff --git a/src/local_deep_research/metrics/token_counter.py b/src/local_deep_research/metrics/token_counter.py
index 5a48372aaa..393923fae3 100644
--- a/src/local_deep_research/metrics/token_counter.py
+++ b/src/local_deep_research/metrics/token_counter.py
@@ -136,8 +136,8 @@ class TokenCountingCallback(BaseCallbackHandler):
else None
)
break
- except Exception as e:
- logger.debug(f"Error capturing call stack: {e}")
+ except Exception:
+ logger.warning("Error capturing call stack")
# Continue without call stack info if there's an error
# Debug logging removed to reduce log clutter
diff --git a/src/local_deep_research/notifications/manager.py b/src/local_deep_research/notifications/manager.py
index c64578cd6a..697f649fc0 100644
--- a/src/local_deep_research/notifications/manager.py
+++ b/src/local_deep_research/notifications/manager.py
@@ -278,8 +278,8 @@ class NotificationManager:
return bool(enabled)
- except Exception as e:
- logger.debug(f"Error checking notification preferences: {e}")
+ except Exception:
+ logger.warning("Error checking notification preferences")
# Default to disabled on error to avoid infinite loops during login
return False
diff --git a/src/local_deep_research/research_library/routes/rag_routes.py b/src/local_deep_research/research_library/routes/rag_routes.py
index 22652f97f0..365cc0a399 100644
--- a/src/local_deep_research/research_library/routes/rag_routes.py
+++ b/src/local_deep_research/research_library/routes/rag_routes.py
@@ -2439,6 +2439,9 @@ def _is_task_cancelled(username: str, db_password: str, task_id: str) -> bool:
)
return task and task.status == "cancelled"
except Exception:
+ logger.warning(
+ "Could not check cancellation status for task %s", task_id
+ )
return False
diff --git a/src/local_deep_research/web/auth/queue_middleware_v2.py b/src/local_deep_research/web/auth/queue_middleware_v2.py
index 39105454c5..e3de056088 100644
--- a/src/local_deep_research/web/auth/queue_middleware_v2.py
+++ b/src/local_deep_research/web/auth/queue_middleware_v2.py
@@ -42,4 +42,3 @@ def notify_queue_processor():
except Exception:
# Don't let queue errors break the request
logger.exception("Error notifying queue processor")
- pass
diff --git a/src/local_deep_research/web_search_engines/engines/search_engine_paperless.py b/src/local_deep_research/web_search_engines/engines/search_engine_paperless.py
index c86612ad4a..044cc35164 100644
--- a/src/local_deep_research/web_search_engines/engines/search_engine_paperless.py
+++ b/src/local_deep_research/web_search_engines/engines/search_engine_paperless.py
@@ -782,4 +782,5 @@ IMPORTANT: Output ONLY the search query. No explanations, no additional text."""
)
return int(response.get("count", -1))
except Exception:
+ logger.debug("Failed to fetch document count", exc_info=True)
return -1
diff --git a/src/local_deep_research/web_search_engines/engines/search_engine_scaleserp.py b/src/local_deep_research/web_search_engines/engines/search_engine_scaleserp.py
index e8a5efde77..54b63f7b61 100644
--- a/src/local_deep_research/web_search_engines/engines/search_engine_scaleserp.py
+++ b/src/local_deep_research/web_search_engines/engines/search_engine_scaleserp.py
@@ -168,6 +168,7 @@ class ScaleSerpSearchEngine(BaseSearchEngine):
)
except Exception:
# Fallback to truncated URL if parsing fails
+ logger.debug("URL parsing failed, using truncation")
display_link = link[:50]
preview = {
diff --git a/src/local_deep_research/web_search_engines/engines/search_engine_wayback.py b/src/local_deep_research/web_search_engines/engines/search_engine_wayback.py
index 747613dcf2..191bc5c87e 100644
--- a/src/local_deep_research/web_search_engines/engines/search_engine_wayback.py
+++ b/src/local_deep_research/web_search_engines/engines/search_engine_wayback.py
@@ -135,6 +135,7 @@ class WaybackSearchEngine(BaseSearchEngine):
second = timestamp[12:14]
return f"{year}-{month}-{day} {hour}:{minute}:{second}"
except Exception:
+ logger.debug("Timestamp formatting failed, returning original")
return timestamp
def _get_wayback_snapshots(self, url: str) -> List[Dict[str, Any]]: