summaryrefslogtreecommitdiff
path: root/ext/fetch/fs_fetch_handler.rs
diff options
context:
space:
mode:
authorhaturau <135221985+haturatu@users.noreply.github.com>2024-11-20 01:20:47 +0900
committerGitHub <noreply@github.com>2024-11-20 01:20:47 +0900
commit85719a67e59c7aa45bead26e4942d7df8b1b42d4 (patch)
treeface0aecaac53e93ce2f23b53c48859bcf1a36ec /ext/fetch/fs_fetch_handler.rs
parent67697bc2e4a62a9670699fd18ad0dd8efc5bd955 (diff)
parent186b52731c6bb326c4d32905c5e732d082e83465 (diff)
Merge branch 'denoland:main' into main
Diffstat (limited to 'ext/fetch/fs_fetch_handler.rs')
-rw-r--r--ext/fetch/fs_fetch_handler.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/ext/fetch/fs_fetch_handler.rs b/ext/fetch/fs_fetch_handler.rs
index 4c2b81f35..c236dd9c6 100644
--- a/ext/fetch/fs_fetch_handler.rs
+++ b/ext/fetch/fs_fetch_handler.rs
@@ -4,7 +4,6 @@ use crate::CancelHandle;
use crate::CancelableResponseFuture;
use crate::FetchHandler;
-use deno_core::error::type_error;
use deno_core::futures::FutureExt;
use deno_core::futures::TryFutureExt;
use deno_core::futures::TryStreamExt;
@@ -42,9 +41,7 @@ impl FetchHandler for FsFetchHandler {
.map_err(|_| ())?;
Ok::<_, ()>(response)
}
- .map_err(move |_| {
- type_error("NetworkError when attempting to fetch resource")
- })
+ .map_err(move |_| super::FetchError::NetworkError)
.or_cancel(&cancel_handle)
.boxed_local();