Issue metadata
Sign in to add a comment
|
Response.text doesn't include rejection from ReadableStream |
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36
Steps to reproduce the problem:
1. Create a Response with a ReadableStream that rejects:
const response = new Response(new ReadableStream({
pull: (controller) => Promise.reject(Error('some reason'))
}));
2. Call Response.text() to extract the text:
const text = await response.text()
or
response.text().then(
(text) => { ... },
(err) => { ... });
What is the expected behavior?
I expect the error to be "Error: some reason".
What went wrong?
All we get is the generic "TypeError: Failed to fetch"
Did this work before? N/A
Chrome version: 62.0.3202.62 Channel: stable
OS Version: 4.4.0-97-generic
Flash Version:
,
Oct 23 2017
,
Oct 23 2017
Confirmed this is a Chrome bug and the spec supports the expected behavior. https://fetch.spec.whatwg.org/#concept-read-all-bytes-from-readablestream step 3 last bullet point. Tentatively assigning to yhirano@ for further triage.
,
Oct 23 2017
The fix here should include web platform tests BTW :)
,
Oct 30 2017
|
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by dglazkov@chromium.org
, Oct 23 2017