From 189201f461f72c626abc9a099657a1b038355ce6 Mon Sep 17 00:00:00 2001 From: buhly Date: Fri, 6 Dec 2024 15:18:30 +0100 Subject: [PATCH] fix issue #45 --- R/utils_httr2.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/utils_httr2.R b/R/utils_httr2.R index a426db5..3535849 100644 --- a/R/utils_httr2.R +++ b/R/utils_httr2.R @@ -223,12 +223,12 @@ resp_check_data <- function(resp) { if (!(httr2::resp_content_type(resp) %in% c("application/zip", "text/csv", "application/json"))) { - stop("Encountered an invalid response type.", + stop(paste0("Encountered an invalid response type (", httr2::resp_content_type(resp), ")."), call. = FALSE) } - return <- httr2::resp_content_type(resp) + return(httr2::resp_content_type(resp)) }