mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 13:26:38 +03:00
Show more errors (#1967)
This commit is contained in:
@@ -581,14 +581,14 @@ pub enum Error {
|
|||||||
#[error("Invalid email address: {0:?}")]
|
#[error("Invalid email address: {0:?}")]
|
||||||
InvalidEmailAddress(String),
|
InvalidEmailAddress(String),
|
||||||
|
|
||||||
#[error("XML error at position {position}")]
|
#[error("XML error at position {position}: {error}")]
|
||||||
InvalidXml {
|
InvalidXml {
|
||||||
position: usize,
|
position: usize,
|
||||||
#[source]
|
#[source]
|
||||||
error: quick_xml::Error,
|
error: quick_xml::Error,
|
||||||
},
|
},
|
||||||
|
|
||||||
#[error("Failed to get URL")]
|
#[error("Failed to get URL: {0}")]
|
||||||
ReadUrlError(#[from] self::read_url::Error),
|
ReadUrlError(#[from] self::read_url::Error),
|
||||||
|
|
||||||
#[error("Number of redirection is exceeded")]
|
#[error("Number of redirection is exceeded")]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ pub async fn read_url(context: &Context, url: &str) -> Result<String, Error> {
|
|||||||
match surf::get(url).recv_string().await {
|
match surf::get(url).recv_string().await {
|
||||||
Ok(res) => Ok(res),
|
Ok(res) => Ok(res),
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
info!(context, "Can\'t read URL {}", url);
|
info!(context, "Can\'t read URL {}: {}", url, err);
|
||||||
|
|
||||||
Err(Error::GetError(err))
|
Err(Error::GetError(err))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user