Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update utils.R #148

Merged
merged 1 commit into from
Jan 8, 2024
Merged

Update utils.R #148

merged 1 commit into from
Jan 8, 2024

Conversation

glilienthal
Copy link
Contributor

While debugging my code I was not quite sure whether the error came from an rtoot call, therefore I propose to add this to the error message.

better error message.
@schochastics
Copy link
Member

Thanks, will merge when getting back to some other maintenance tasks o the package

@@ -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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

stop(paste("Unable to make the request. Status Code: ", status_code), call. = FALSE)

@schochastics schochastics changed the base branch from main to error_msg January 8, 2024 20:34
@schochastics schochastics merged commit e4951d9 into gesistsa:error_msg Jan 8, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants