From 6159bd82d61f5ea303461c3a43abfea663e0a68e Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Wed, 5 Oct 2022 08:27:27 -0700 Subject: [PATCH] Process response after download failure Relates to #399 --- R/drive_download.R | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/R/drive_download.R b/R/drive_download.R index 9b94041e5..2ffbf496d 100644 --- a/R/drive_download.R +++ b/R/drive_download.R @@ -114,6 +114,11 @@ drive_download <- function(file, "*" = "{.path {path}}" )) } else { + # drop this in to allow a post mortem inspection of failure + # not how this would be wired up "in production" + # puts the response within reach of the unexported functions + # gargle:::gargle_last_response()` and gargle:::gargle_last_content() + gargle::response_process(response) drive_abort("Download failed.") } invisible(put_column(file, nm = "local_path", val = path, .after = "name"))