summaryrefslogtreecommitdiff
path: root/ext/fetch/fs_fetch_handler.rs
diff options
context:
space:
mode:
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();