mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-30 19:03:01 +01:00
Start app even if server init fails to let user fix it
Show stacktrace on error to help debugging
This commit is contained in:
parent
ef6a0044f4
commit
3e3a1ecbc8
2 changed files with 2 additions and 3 deletions
|
@ -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):
|
||||
|
|
|
@ -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 = []
|
||||
|
|
Loading…
Reference in a new issue