Skip to content

Commit

Permalink
Update utils.R
Browse files Browse the repository at this point in the history
better error message.
  • Loading branch information
glilienthal authored Dec 12, 2023
1 parent 0c8d246 commit 3fd42b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ make_get_request <- function(token, path, params = list(), instance = NULL, anon

status_code <- httr::status_code(request_results)
if (!status_code %in% c(200, 429)) {
stop(paste("something went wrong. Status code:", status_code), call. = FALSE)
stop(paste("something went wrong in a call in the root package. Status code:", status_code), call. = FALSE)
} else if (status_code == 429) {
message("too many requests. Sleeping for 5 minutes")
Sys.sleep(60 * 5)
Expand Down

0 comments on commit 3fd42b8

Please sign in to comment.