mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(agent): preserve tracebacks in prompt_builder and trajectory warnings
Two `except Exception as e:` warnings lose the traceback: - agent/prompt_builder.py: skill-file frontmatter parse failure - agent/trajectory.py: trajectory log append failure Add `exc_info=True` so the stack is preserved when a skill manifest is malformed or trajectory writes hit filesystem errors in production.
This commit is contained in:
parent
73bccc94c7
commit
8c4eeffb4c
2 changed files with 2 additions and 2 deletions
|
|
@ -545,7 +545,7 @@ def _parse_skill_file(skill_file: Path) -> tuple[bool, dict, str]:
|
|||
|
||||
return True, frontmatter, extract_skill_description(frontmatter)
|
||||
except Exception as e:
|
||||
logger.warning("Failed to parse skill file %s: %s", skill_file, e)
|
||||
logger.warning("Failed to parse skill file %s: %s", skill_file, e, exc_info=True)
|
||||
return True, {}, ""
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -53,4 +53,4 @@ def save_trajectory(trajectory: List[Dict[str, Any]], model: str,
|
|||
f.write(json.dumps(entry, ensure_ascii=False) + "\n")
|
||||
logger.info("Trajectory saved to %s", filename)
|
||||
except Exception as e:
|
||||
logger.warning("Failed to save trajectory: %s", e)
|
||||
logger.warning("Failed to save trajectory: %s", e, exc_info=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue