Skip to content

Commit

Permalink
retry on 408 status codes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEdmondson1234 committed Dec 28, 2020
1 parent a767bdf commit 06e6118
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# googleAuthR 1.3.1.9000

* Fix batching when response has a blank line in first line
* Retry on 408 status codes (#199)

# googleAuthR 1.3.1

Expand Down
2 changes: 1 addition & 1 deletion R/generator.R
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ retryRequest <- function(f){

myMessage("API returned error: ",paste(error), level = 2)

if(grepl("^5|429",status_code)){
if(grepl("^5|429|408",status_code)){
try_attempts <- getOption("googleAuthR.tryAttempts")
for(i in 1:try_attempts){
myMessage("Trying again: ", i, " of ", try_attempts, level = 3)
Expand Down

0 comments on commit 06e6118

Please sign in to comment.