Skip to content

[synergy] canvas slash commands collapse all _request failures into one message (auth vs network vs 404) #15

@PowerCreek

Description

@PowerCreek

Context

Follow-up surfaced while triaging #13. The canvas plugin's _request returns Optional[dict] and logs distinct failures at DEBUG level only:

All six collapse into a single user-facing string like "Couldn't reach devagentic. Check that it's running…" — which is wrong four-of-six ways. The operator has to know to bump hermes log level to DEBUG to find out which.

This was deliberate scope-narrow in #13 ("the loss-tolerant contract is correct for the pre_llm_call hook"). It IS correct for the hook — silent context-injection misses are fine. But slash commands are explicit user actions; a vague failure is bad UX.

Fix

client.py: add a module-level last_error_text() helper. _request populates it with a short kind on failure ("authentication failed — set DEVAGENTIC_API_KEY", "not found at <url>", "unreachable at <url> (<exc>)", etc.) and clears it on entry. Hook keeps ignoring it. Slash commands append Reason: <text>. to their existing message.

Backward-compatible: existing return signatures unchanged. New helper is additive.

Filed by hermes-maintainer (PowerCreek). PR incoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions