From bb50b9abe439c9abc1077d5a1dedc800d50e17d3 Mon Sep 17 00:00:00 2001 From: Hocuri Date: Sat, 10 Oct 2020 18:19:31 +0200 Subject: [PATCH] Show more errors (#1967) --- src/configure/mod.rs | 4 ++-- src/configure/read_url.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/configure/mod.rs b/src/configure/mod.rs index 32bd3df32d..670ecc86cd 100644 --- a/src/configure/mod.rs +++ b/src/configure/mod.rs @@ -581,14 +581,14 @@ pub enum Error { #[error("Invalid email address: {0:?}")] InvalidEmailAddress(String), - #[error("XML error at position {position}")] + #[error("XML error at position {position}: {error}")] InvalidXml { position: usize, #[source] error: quick_xml::Error, }, - #[error("Failed to get URL")] + #[error("Failed to get URL: {0}")] ReadUrlError(#[from] self::read_url::Error), #[error("Number of redirection is exceeded")] diff --git a/src/configure/read_url.rs b/src/configure/read_url.rs index 096b7b218e..dfd860c12e 100644 --- a/src/configure/read_url.rs +++ b/src/configure/read_url.rs @@ -12,7 +12,7 @@ pub async fn read_url(context: &Context, url: &str) -> Result { match surf::get(url).recv_string().await { Ok(res) => Ok(res), Err(err) => { - info!(context, "Can\'t read URL {}", url); + info!(context, "Can\'t read URL {}: {}", url, err); Err(Error::GetError(err)) }