mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 02:48:50 +00:00
## Summary - Fixed HTMLRewriter to throw proper errors instead of `[native code: Exception]` - The issue was incorrect error handling in the `transform_` function - it wasn't properly checking for errors from `beginTransform()` - Added proper error checking using `toError()` method on JSValue to normalize Exception and Error instances ## Test plan - Added regression test in `test/regression/issue/19219.test.ts` - Test verifies that HTMLRewriter throws proper TypeError with descriptive message when handlers throw - All existing HTMLRewriter tests continue to pass Fixes #19219 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Co-authored-by: Claude Bot <claude-bot@bun.sh> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1.7 KiB
1.7 KiB