Skip to content

fix(ext/node): handle errors when piping object mode to non-object mode streams#32742

Open
bartlomieju wants to merge 1 commit intomainfrom
fix/stream-pipe-objectmode-error-handling
Open

fix(ext/node): handle errors when piping object mode to non-object mode streams#32742
bartlomieju wants to merge 1 commit intomainfrom
fix/stream-pipe-objectmode-error-handling

Conversation

@bartlomieju
Copy link
Copy Markdown
Member

Summary

  • Fix ERR_INVALID_ARG_TYPE being thrown instead of emitted when piping objects from an object mode stream to a non-object mode stream
  • Wrap synchronous _write/_writev/_transform calls in try-catch so user throws are caught and routed through the error handling path
  • Enable test-stream-pipe-objectmode-to-non-objectmode.js compat test

Test plan

  • ./x test-compat test-stream-pipe-objectmode-to-non-objectmode.js passes

🤖 Generated with Claude Code

…de streams

Catch synchronous throws in stream _write/_writev/_transform so errors
are properly emitted instead of becoming uncaught exceptions. This fixes
piping from object mode readable streams to non-object mode writable streams.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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