mirror of
https://github.com/oven-sh/bun
synced 2026-02-13 12:29:07 +00:00
fix: body already used error to throw TypeError (#24114)
Should fix https://github.com/oven-sh/bun/issues/24104 ### What does this PR do? This PR is changing `ERR_BODY_ALREADY_USED` to be TypeError instead of Error. ### How did you verify your code works? A test case added to verify that request call correctly throws a TypeError after another request call on the same Request, confirming the fix addresses the issue. --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -20,7 +20,7 @@ const errors: ErrorCodeMapping = [
|
||||
["ERR_ASSERTION", Error],
|
||||
["ERR_ASYNC_CALLBACK", TypeError],
|
||||
["ERR_ASYNC_TYPE", TypeError],
|
||||
["ERR_BODY_ALREADY_USED", Error],
|
||||
["ERR_BODY_ALREADY_USED", TypeError],
|
||||
["ERR_BORINGSSL", Error],
|
||||
["ERR_ZSTD", Error],
|
||||
["ERR_BROTLI_INVALID_PARAM", RangeError],
|
||||
|
||||
Reference in New Issue
Block a user