Skip to content

Commit

Permalink
Re-added error message in refresh_pipermail when an http error is enc…
Browse files Browse the repository at this point in the history
…ountered

Done as requested by Carlos
  • Loading branch information
ian-lastname authored Apr 29, 2024
1 parent 0751218 commit be4ff32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions R/mail.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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)
}

Expand Down Expand Up @@ -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)
}

Expand Down Expand Up @@ -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)
}

Expand Down

0 comments on commit be4ff32

Please sign in to comment.