From 4d32f40306aa632b4dff6f5368c93016e5cd1831 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 7 May 2026 06:26:18 -0700 Subject: [PATCH] fix(gateway): include exception detail in bootstrap warning output Follow-up to the salvaged warning. Without the exception string, operators see "config validation failed" with no hint why. --- gateway/run.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gateway/run.py b/gateway/run.py index 6a86a1e37c..fd89a8ea63 100644 --- a/gateway/run.py +++ b/gateway/run.py @@ -498,22 +498,22 @@ try: _network_cfg = (_cfg if '_cfg' in dir() else {}).get("network", {}) if isinstance(_network_cfg, dict) and _network_cfg.get("force_ipv4"): apply_ipv4_preference(force=True) -except Exception: - print(" Warning: IPv4 preference application failed", file=sys.stderr) +except Exception as _bootstrap_exc: + print(f" Warning: IPv4 preference application failed: {_bootstrap_exc}", file=sys.stderr) # Validate config structure early — log warnings so gateway operators see problems try: from hermes_cli.config import print_config_warnings print_config_warnings() -except Exception: - print(" Warning: config validation failed", file=sys.stderr) +except Exception as _bootstrap_exc: + print(f" Warning: config validation failed: {_bootstrap_exc}", file=sys.stderr) # Warn if user has deprecated MESSAGING_CWD / TERMINAL_CWD in .env try: from hermes_cli.config import warn_deprecated_cwd_env_vars warn_deprecated_cwd_env_vars() -except Exception: - print(" Warning: deprecation check failed", file=sys.stderr) +except Exception as _bootstrap_exc: + print(f" Warning: deprecation check failed: {_bootstrap_exc}", file=sys.stderr) # Gateway runs in quiet mode - suppress debug output and use cwd directly (no temp dirs) os.environ["HERMES_QUIET"] = "1"