Repository navigation
fix(sse): skip Trae upstream status on a 2xx with no body - #15686
Merged
Merged
Conversation
A missing body after 200 is a local stream failure. Proxy health should not count that status as an upstream error.
Contributor
CI Coverage Report
Coverage artifact was not available for this run. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
upstreamStatussó é 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).