Gateway logs nothing when a Frames call fails, except on 401

Open Beginner friendly
#124 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go

Research direction

Start in internal/frames/framesmcp/server.go, focusing on the session.Connect, session.CallTool, failed, token-source, and URL-error paths named in the issue. Compare their logging with the memory.recall_failed warning, keeping tokens and request bodies out of logs. Done means each failure path emits a WARN with its cause and relevant context, including a distinct message for token-source failures.

Written by the indexing model from the issue text.

Description

When Frames is down, the gateway logs nothing. An operator has no line to find, and the only sign anything is wrong is an agent telling the person that Frames didn't respond.

I tested this on the powershift demo cluster by scaling Frames to 0 for about nine minutes (v0.4.0). Home chat behaved well: it said Frames didn't respond after several tries, didn't make up an answer, and suggested trying again later. On the gateway side, Tempo shows eight /frames/mcp calls, all HTTP 200 in 1-58 ms, because the forwarder returns the failure as an MCP tool error. The gateway log has no line at all for them.

Memory doesn't have this gap. With mem0 at 0 in the same test, every failed call got a WARN with the cause (memory.recall_failed ... mem0: POST /search: dial tcp ...:8000: connect: connection refused), so it was obvious what was down and why.

On main (e493830), in internal/frames/framesmcp/server.go:

  • When session.Connect or session.CallTool fails (:140, :152), the error is thrown away and failed is called. failed (:160) logs only when Frames answered 401 (frames.token_refused, :165). A connection refused, a timeout, a 5xx or a protocol error all come back as MsgFramesUnavailable with no log line.
  • The token-source failure and the two URL errors (:109, :113, :117) return MsgFramesUnavailable without logging either.

We should log each of these at WARN, the way memory does: a frames.call_failed with the cause, the Frames URL and the tool name, and never the token or body (as frames.token_refused already does). The token-source failure needs its own message so it isn't mistaken for Frames being down.

#119 covers the tool name missing from traces. This is the other half: even without a trace backend, the log should say Frames is unreachable.

Dominant language
Go
Stars
5
Forks
0
Avg merge
21h 13m
Merged PRs (30d)
53

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nebari-dev/tapas

All issues in nebari-dev/tapas

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.