Start app even if server init fails to let user fix it

Show stacktrace on error to help debugging
This commit is contained in:
Debanjum Singh Solanky 2023-07-17 14:33:02 -07:00
parent ef6a0044f4
commit 3e3a1ecbc8
2 changed files with 2 additions and 3 deletions

View file

@ -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):

View file

@ -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 = []