diff options
author | Leo Kettmeir <crowlkats@toaxl.com> | 2024-10-18 18:20:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-19 01:20:58 +0000 |
commit | 6c4ef11f04cc35b61417bf08d5e7592d44197c75 (patch) | |
tree | 1dd2f4031dfd2f66004dca423bb0cf3da009443b /ext/fetch/fs_fetch_handler.rs | |
parent | d1cd1fafa4f09b215a9ce2eb330dc810a6635afd (diff) |
refactor(ext/fetch): use concrete error types (#26220)
Diffstat (limited to 'ext/fetch/fs_fetch_handler.rs')
-rw-r--r-- | ext/fetch/fs_fetch_handler.rs | 5 |
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(); |