Skip to content

Fix: pass stream error to next and call destroyAndRestore() in second…#207

Merged
papandreou merged 1 commit intopapandreou:masterfrom
outlawtorn:master
Apr 30, 2026
Merged

Fix: pass stream error to next and call destroyAndRestore() in second…#207
papandreou merged 1 commit intopapandreou:masterfrom
outlawtorn:master

Conversation

@outlawtorn
Copy link
Copy Markdown
Contributor

Fix error handling in secondGuessSourceContentType stream listener

When a stream emits an error before the first data chunk, the error handler was calling next(500) — passing a hardcoded status code instead of the actual error, and skipping the
destroyAndRestore() cleanup call.

This fix passes the real error to next(err) and calls destroyAndRestore() first to properly clean up the stream before handing off to the error handler.

@outlawtorn
Copy link
Copy Markdown
Contributor Author

@papandreou thank you, the checks are working now.
fyi @paras20xx

@papandreou papandreou merged commit 36f9c42 into papandreou:master Apr 30, 2026
5 checks passed
@papandreou
Copy link
Copy Markdown
Owner

Released in 11.2.1. The test looks bit crazy though 😅

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.

2 participants