8000 fix: surface invalid session errors from agent runs by KevinAndrewDong · Pull Request #564 · google/adk-web · GitHub
[go: up one dir, main page]

Skip to content

fix: surface invalid session errors from agent runs - #564

Open
KevinAndrewDong wants to merge 1 commit into
google:mainfrom
KevinAndrewDong:fix/missing-session-http-errors
Open

KevinAndrewDong wants to merge 1 commit into
google:mainfrom
KevinAndrewDong:fix/missing-session-http-errors

Conversation

@KevinAndrewDong
Copy link
Copy Markdown

Summary

Fixes #99.

An agent run against a session removed by a backend reload now shows a message explaining that the session is unavailable and that the user can start a new one using the existing New Session button.

 POST /run_sse
- interpret every response as SSE, silently completing on a JSON 404
+ reject non-success HTTP responses before reading the SSE body
+ show a recovery message for 404, and readable text for other errors

The current session and messages stay available until the user chooses New Session. Requests are not automatically retried.

Evidence

  • Before: The focused suite failed six new checks covering HTTP 401/404/500 rejection and readable chat errors; 163 existing checks passed.
    After: All 169 focused checks passed. The full CI test command passed 865 checks, with 37 skipped by the existing suite configuration.
  • Full suite: npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI with Chrome configured through CHROME_BIN.
  • Browser check with the actual development UI and a local HTTP stub: a 404 displayed the recovery message, preserved the sent message, and did not create a session or retry the run. After selecting New Session, a fresh session could send and receive an SSE reply. This check did not use a real ADK backend.
  • Independent read-only review through DSH covered the complete diff and related callers: no actionable findings. The review did not run tests independently.

Merge Danger

Door: Two-way.

Blast Radius: Streaming.

Non-success HTTP responses from AgentService.runSse now reach its callers' existing error handlers. Successful SSE parsing and cancellation behavior are unchanged.

AI assistance: Codex was used for implementation and regression tests; DSH provided an independent read-only review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve error handling of posting to invalid sessions

1 participant

0