ag-ui-protocol / ag-ui-protocol/ag-ui

HttpAgent: non-OK HTTP response throws inside the rxjs pipeline with no catch — runAgent consumers never see the failure

オープン
#2,329 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
15.9k
フォーク
1.4k
平均マージ
1日 17時間
マージ済み PR(30日)
163

説明

## Context

Same production evaluation as #2327 (`@ag-ui/client@0.0.57`, `@ag-ui/core@0.0.57`, consumed through `@assistant-ui/react-ag-ui@0.0.50`).

## Finding

When the agent endpoint answers a non-OK HTTP status, `HttpAgent` throws from inside its rxjs pipeline. There is no catch on that path, so:

- the error surfaces as an **unhandled promise rejection**, not through any callback the consumer registered;
- `useAgUiRuntime`'s `onError` never fires;
- the run never settles — from the UI's point of view the turn neither finished nor failed (dead composer, no user-visible failure state);
- error reporting hooks (Sentry etc.) attached to the runtime see nothing.

Combined with the RUN_ERROR/RUN_CANCELLED semantics in #2327, there is currently no reliable channel by which a consumer learns "this run failed at the transport level."

## Interim we ship

A custom `fetch` (already required for cookie credentials, see #2327 item 3) that converts a non-OK response into a coded `RUN_ERROR` event stream, so the run settles honestly through the normal event channel.

## Ask

Catch transport-level failures inside `HttpAgent` and emit them as `RUN_ERROR` (or reject `runAgent` with a typed error) so consumers get exactly one failure channel. An unhandled rejection from a library pipeline is not consumable.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。