mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-08 03:01:47 +00:00
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.
This commit is contained in:
parent
926402dd13
commit
4d32f40306
1 changed files with 6 additions and 6 deletions
|
|
@ -498,22 +498,22 @@ try:
|
||||||
_network_cfg = (_cfg if '_cfg' in dir() else {}).get("network", {})
|
_network_cfg = (_cfg if '_cfg' in dir() else {}).get("network", {})
|
||||||
if isinstance(_network_cfg, dict) and _network_cfg.get("force_ipv4"):
|
if isinstance(_network_cfg, dict) and _network_cfg.get("force_ipv4"):
|
||||||
apply_ipv4_preference(force=True)
|
apply_ipv4_preference(force=True)
|
||||||
except Exception:
|
except Exception as _bootstrap_exc:
|
||||||
print(" Warning: IPv4 preference application failed", file=sys.stderr)
|
print(f" Warning: IPv4 preference application failed: {_bootstrap_exc}", file=sys.stderr)
|
||||||
|
|
||||||
# Validate config structure early — log warnings so gateway operators see problems
|
# Validate config structure early — log warnings so gateway operators see problems
|
||||||
try:
|
try:
|
||||||
from hermes_cli.config import print_config_warnings
|
from hermes_cli.config import print_config_warnings
|
||||||
print_config_warnings()
|
print_config_warnings()
|
||||||
except Exception:
|
except Exception as _bootstrap_exc:
|
||||||
print(" Warning: config validation failed", file=sys.stderr)
|
print(f" Warning: config validation failed: {_bootstrap_exc}", file=sys.stderr)
|
||||||
|
|
||||||
# Warn if user has deprecated MESSAGING_CWD / TERMINAL_CWD in .env
|
# Warn if user has deprecated MESSAGING_CWD / TERMINAL_CWD in .env
|
||||||
try:
|
try:
|
||||||
from hermes_cli.config import warn_deprecated_cwd_env_vars
|
from hermes_cli.config import warn_deprecated_cwd_env_vars
|
||||||
warn_deprecated_cwd_env_vars()
|
warn_deprecated_cwd_env_vars()
|
||||||
except Exception:
|
except Exception as _bootstrap_exc:
|
||||||
print(" Warning: deprecation check failed", file=sys.stderr)
|
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)
|
# Gateway runs in quiet mode - suppress debug output and use cwd directly (no temp dirs)
|
||||||
os.environ["HERMES_QUIET"] = "1"
|
os.environ["HERMES_QUIET"] = "1"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue