Skip to content

fix(sse): skip Trae upstream status on a 2xx with no body - #15686

Merged
diegosouzapw merged 1 commit into
release/v3.8.52from
fix/trae-2xx-upstream-status
Oct 6, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.52from
fix/trae-2xx-upstream-status

Conversation

@diegosouzapw

Copy link
Copy Markdown
Owner

O #15434 já publicava o status do stream de eventos da Trae quando !res.ok || !res.body. Um 200 sem body é falha local do stream, e mesmo assim o 200 entrava como status de upstream.

Agora o upstreamStatus só é gravado quando !res.ok. O throw continua nos dois casos. O caminho de criar sessão já estava certo e não mudou.

O teste "event stream 2xx without a body" falhou no tip (200 !== undefined) e passou depois do ajuste. Os outros quatro do arquivo continuam verdes (429, 503, refresh).

⚠️ base-red inherited: #15306 (timeouts de suíte no tip, não neste diff).

A missing body after 200 is a local stream failure. Proxy health should
not count that status as an upstream error.
@diegosouzapw
diegosouzapw merged commit 77bca6f into release/v3.8.52 Oct 6, 2026
9 of 13 checks passed
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

CI Coverage Report

  • Coverage job: skipped
  • PR test policy: success

Coverage artifact was not available for this run.

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.

1 participant