Skip to content

Commit

Permalink
Process response after download failure
Browse files Browse the repository at this point in the history
Relates to #399
  • Loading branch information
jennybc committed Oct 5, 2022
1 parent 0bb0070 commit 15622e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/drive_download.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit 15622e7

Please sign in to comment.