diff --git a/src/khoj/configure.py b/src/khoj/configure.py index 680c5417..74f7bd9b 100644 --- a/src/khoj/configure.py +++ b/src/khoj/configure.py @@ -54,8 +54,7 @@ def initialize_server( try: configure_server(config, regenerate, type) except Exception as e: - logger.error(f"🚨 Failed to configure server on app load: {e}") - raise e + logger.error(f"🚨 Failed to configure server on app load: {e}", exc_info=True) def configure_server(config: FullConfig, regenerate: bool, search_type: Optional[SearchType] = None): diff --git a/src/khoj/routers/api.py b/src/khoj/routers/api.py index 0269987d..834e8997 100644 --- a/src/khoj/routers/api.py +++ b/src/khoj/routers/api.py @@ -532,7 +532,7 @@ def update( configure_server(state.config, regenerate=force or False, search_type=t) except Exception as e: error_msg = f"🚨 Failed to update server via API: {e}" - logger.error(error_msg) + logger.error(error_msg, exc_info=True) raise HTTPException(status_code=500, detail=error_msg) else: components = []