Log attachment fetching errors
This commit is contained in:
parent
dd6317561e
commit
c488d5b5d4
1 changed files with 4 additions and 1 deletions
|
@ -177,7 +177,10 @@ pub async fn handle_note(
|
|||
let attachment_url = attachment.url
|
||||
.ok_or(ValidationError("attachment URL is missing"))?;
|
||||
let (file_name, media_type) = fetch_file(&attachment_url, media_dir).await
|
||||
.map_err(|_| ValidationError("failed to fetch attachment"))?;
|
||||
.map_err(|err| {
|
||||
log::warn!("{}", err);
|
||||
ValidationError("failed to fetch attachment")
|
||||
})?;
|
||||
log::info!("downloaded attachment {}", attachment_url);
|
||||
downloaded.push((
|
||||
file_name,
|
||||
|
|
Loading…
Reference in a new issue