From 3fd42b899c448c354fc4075a0ea9b644fcc44a4d Mon Sep 17 00:00:00 2001 From: glilienthal Date: Tue, 12 Dec 2023 17:53:37 +0100 Subject: [PATCH 1/2] Update utils.R better error message. --- R/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index d9723d3..bff68bd 100644 --- a/R/utils.R +++ b/R/utils.R @@ -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) From b8c6eab8c7aa01f671f25a7f684b351f65d65dce Mon Sep 17 00:00:00 2001 From: David Schoch Date: Mon, 8 Jan 2024 21:36:32 +0100 Subject: [PATCH 2/2] new error message --- R/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index f61530d..568c54f 100644 --- a/R/utils.R +++ b/R/utils.R @@ -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 in a call in the root package. Status code:", status_code), call. = FALSE) + stop(paste("Unable to make the request. Status Code: ", status_code), call. = FALSE) } else if (status_code == 429) { message("too many requests. Sleeping for 5 minutes") Sys.sleep(60 * 5)