mirror of
https://github.com/denoland/deno.git
synced 2025-09-28 05:04:48 +00:00
fix: improve http client builder error message (#9380)
Include the lower-level error message in the generic error message. No test because I can't actually make it fail by passing it bad PEM. I checked and `reqwest::Certificate::from_pem()` always returns `Ok()`. Fixes #9364.
This commit is contained in:
parent
3f6483e501
commit
fb358380c0
3 changed files with 5 additions and 3 deletions
|
@ -3,6 +3,7 @@
|
|||
#![deny(warnings)]
|
||||
|
||||
use deno_core::error::bad_resource_id;
|
||||
use deno_core::error::generic_error;
|
||||
use deno_core::error::type_error;
|
||||
use deno_core::error::AnyError;
|
||||
use deno_core::futures::Future;
|
||||
|
@ -433,5 +434,5 @@ fn create_http_client(
|
|||
}
|
||||
builder
|
||||
.build()
|
||||
.map_err(|_| deno_core::error::generic_error("Unable to build http client"))
|
||||
.map_err(|e| generic_error(format!("Unable to build http client: {}", e)))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue