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

Issues reading response on turbo:submit-end #19

Closed
cj opened this issue Dec 22, 2020 · 1 comment
Closed

Issues reading response on turbo:submit-end #19

cj opened this issue Dec 22, 2020 · 1 comment

Comments

@cj
Copy link

cj commented Dec 22, 2020

I am trying to read the error response from turbo:submit-end, but it is failing with:

base.js:96 Uncaught (in promise) TypeError: Failed to execute 'text' on 'Response': body stream already read

The test code I have is as follows:

  async turboSubmit(event) {
    const {
      success,
      fetchResponse: { response },
    } = event.detail

    if (success) {
      return
    }

    console.log(await response.text())
  }
@dhh
Copy link
Member

dhh commented Sep 1, 2021

Fixed by #364

@dhh dhh closed this as completed Sep 1, 2021
fletchto99 pushed a commit to github/turbo that referenced this issue Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants