Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/ext/web/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ impl ExtensionTrait<WebOptions> for deno_fetch::deno_fetch {
user_agent: options.user_agent.clone(),
root_cert_store_provider: options.root_cert_store_provider.clone(),
proxy: options.proxy.clone(),
request_builder_hook: None, // TODO(ysh) as it's not used
request_builder_hook: options.request_builder_hook,
unsafely_ignore_certificate_errors: options.unsafely_ignore_certificate_errors.clone(),
client_cert_chain_and_key: options.client_cert_chain_and_key.clone(),
file_fetch_handler: options.file_fetch_handler.clone(),
Expand Down
4 changes: 2 additions & 2 deletions src/ext/web/options.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::{DefaultWebPermissions, WebPermissions};
use deno_core::error::AnyError;
use deno_error::JsErrorBox;
use deno_fetch::dns::Resolver;
use hyper_util::client::legacy::Builder;
use std::sync::Arc;
Expand All @@ -22,7 +22,7 @@ pub struct WebOptions {
/// Request builder hook for fetch
#[allow(clippy::type_complexity)]
pub request_builder_hook:
Option<fn(&mut http::Request<deno_fetch::ReqBody>) -> Result<(), AnyError>>,
Option<fn(&mut http::Request<deno_fetch::ReqBody>) -> Result<(), JsErrorBox>>,

/// List of domain names or IP addresses for which fetches and network OPs will ignore SSL errors
///
Expand Down
2 changes: 1 addition & 1 deletion src/runtime_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ impl RuntimeBuilder {
#[must_use]
pub fn with_web_request_builder_hook(
mut self,
hook: fn(&mut http::Request<deno_fetch::ReqBody>) -> Result<(), deno_core::error::AnyError>,
hook: fn(&mut http::Request<deno_fetch::ReqBody>) -> Result<(), deno_error::JsErrorBox>,
) -> Self {
self.0.extension_options.web.request_builder_hook = Some(hook);
self
Expand Down
Loading