Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unhandled error when throwing read responses #11055

Closed
mbwestphal opened this issue Nov 23, 2023 · 3 comments · Fixed by #11061
Closed

[Bug]: Unhandled error when throwing read responses #11055

mbwestphal opened this issue Nov 23, 2023 · 3 comments · Fixed by #11061
Labels

Comments

@mbwestphal
Copy link

What version of React Router are you using?

6.14.2

Steps to Reproduce

  • Handle errors in an error element
  • In any loader: Read the body of a Response using .json() or .text()
  • Throw that response

Expected Behavior

The error element catches something. Maybe even exactly the error of reading from an already consumed response.

Actual Behavior

The error element does not catch anything.

Instead an error is printed to the console:

Uncaught (in promise) TypeError: Response.text: Body has already been consumed.
@brophdawg11
Copy link
Contributor

This is resolved by #11061 and will be available in the next release

@brophdawg11 brophdawg11 added the awaiting release This issue have been fixed and will be released soon label Dec 4, 2023
Copy link
Contributor

github-actions bot commented Dec 5, 2023

🤖 Hello there,

We just published version 6.21.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Copy link
Contributor

🤖 Hello there,

We just published version 6.21.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@brophdawg11 brophdawg11 removed the awaiting release This issue have been fixed and will be released soon label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants