mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix(vision): surface actual error reason instead of generic message
When vision_analyze_tool fails, the except block was returning a generic 'could not be analyzed' message that gave the agent no actionable information about the failure cause. Replace the generic message with the actual exception string so the agent can distinguish between backend errors, missing dependencies, network failures, and unsupported image paths. Also add an 'error' field to the failure response for structured error handling by callers. Fixes #1034
This commit is contained in:
parent
60710bc8f8
commit
7dc9281f05
1 changed files with 1 additions and 0 deletions
|
|
@ -354,6 +354,7 @@ async def vision_analyze_tool(
|
|||
# Prepare error response
|
||||
result = {
|
||||
"success": False,
|
||||
"error": error_msg,
|
||||
"analysis": analysis,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue