Show more errors (#1967)

This commit is contained in:
Hocuri
2020-10-10 18:19:31 +02:00
committed by GitHub
parent 48e1f53826
commit bb50b9abe4
2 changed files with 3 additions and 3 deletions

View File

@@ -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")]

View File

@@ -12,7 +12,7 @@ pub async fn read_url(context: &Context, url: &str) -> Result<String, Error> {
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))
}