From be4ff329fa8a9dd270e7f001128c1c3f6488987a Mon Sep 17 00:00:00 2001 From: Ian Jaymes Iwata <97856957+ian-lastname@users.noreply.github.com> Date: Sun, 28 Apr 2024 23:35:04 -1000 Subject: [PATCH] Re-added error message in refresh_pipermail when an http error is encountered Done as requested by Carlos --- R/mail.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/mail.R b/R/mail.R index 107e7d12..f98bacdd 100644 --- a/R/mail.R +++ b/R/mail.R @@ -421,6 +421,7 @@ refresh_pipermail <- function(archive_url, mailing_list, archive_type, save_fold # Remove file if error # Can only be done post-write, see https://github.com/r-lib/httr/issues/553 if (httr::http_error(x) && file.exists(full_tmp_save_path)) { + warning(paste0("Unable to download: ",destination[[counter]])) file.remove(full_tmp_save_path) } @@ -455,6 +456,7 @@ refresh_pipermail <- function(archive_url, mailing_list, archive_type, save_fold # Remove file if error # Can only be done post-write, see https://github.com/r-lib/httr/issues/553 if (httr::http_error(x) && file.exists(full_tmp_save_path)) { + warning(paste0("Unable to download: ",destination[[counter]])) file.remove(full_tmp_save_path) } @@ -490,6 +492,7 @@ refresh_pipermail <- function(archive_url, mailing_list, archive_type, save_fold # Remove file if error # Can only be done post-write, see https://github.com/r-lib/httr/issues/553 if (httr::http_error(x) && file.exists(full_tmp_save_path)) { + warning(paste0("Unable to download: ",destination[[counter]])) file.remove(full_tmp_save_path) } @@ -527,6 +530,7 @@ refresh_pipermail <- function(archive_url, mailing_list, archive_type, save_fold # Remove file if error # Can only be done post-write, see https://github.com/r-lib/httr/issues/553 if (httr::http_error(x) && file.exists(full_tmp_save_path)) { + warning(paste0("Unable to download: ",destination[[counter]])) file.remove(full_tmp_save_path) }