diff options
author | Marcos Casagrande <marcoscvp90@gmail.com> | 2022-10-12 09:23:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 09:23:33 +0200 |
commit | d47b17d37df8590e4fc2abc249ee33e3ce612251 (patch) | |
tree | 9734f458b16793bce6f4bb2a8a6a1edd29ebc989 /ext/fetch/lib.rs | |
parent | 2c96f64fa7ec7655200de4c6740ceade78a3fad7 (diff) |
fix(ext/fetch): throw TypeError on read failure (#16219)
Diffstat (limited to 'ext/fetch/lib.rs')
-rw-r--r-- | ext/fetch/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/fetch/lib.rs b/ext/fetch/lib.rs index b8f784284..c141c3065 100644 --- a/ext/fetch/lib.rs +++ b/ext/fetch/lib.rs @@ -509,7 +509,7 @@ impl Resource for FetchResponseBodyResource { // safely call `await` on it without creating a race condition. Some(_) => match reader.as_mut().next().await.unwrap() { Ok(chunk) => assert!(chunk.is_empty()), - Err(err) => break Err(AnyError::from(err)), + Err(err) => break Err(type_error(err.to_string())), }, None => break Ok(BufView::empty()), } |