Skip to content

Commit

Permalink
Switch to gargle::request_retry()
Browse files Browse the repository at this point in the history
Relates to #380.

This is only "relates" and not "closes" because #380 shows that many retry-able errors with Drive will be a 403 (with specific `reasons`), which are not among the retry-able code currently built-in to `gargle::request_retry()`.

But at least we'll retry for 429 now.
  • Loading branch information
jennybc committed Jun 8, 2023
1 parent a1216a5 commit ea0ca46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# googledrive (development version)

* All requests now route through `gargle::request_retry()` (#380).

* `drive_scopes()` is a new function to access scopes used with the Drive API.
When called without arguments, `drive_scopes()` returns a named vector scopes,
where the names are the associated short aliases. `drive_scopes()` can also
Expand Down
2 changes: 1 addition & 1 deletion R/request_make.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#' @export
#' @family low-level API functions
request_make <- function(x, ...) {
gargle::request_make(x, ..., user_agent = drive_ua())
gargle::request_retry(x, ..., user_agent = drive_ua())
}

#' @rdname request_make
Expand Down

0 comments on commit ea0ca46

Please sign in to comment.