From 41d974b13074942b561b2637ee30477756db14af Mon Sep 17 00:00:00 2001 From: muschellij2 Date: Mon, 13 Nov 2023 21:49:26 -0500 Subject: [PATCH] added error output --- R/scopus_search.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/scopus_search.R b/R/scopus_search.R index 56b59b7..10fc473 100644 --- a/R/scopus_search.R +++ b/R/scopus_search.R @@ -100,6 +100,10 @@ scopus_search <- function( r$url = httr::build_url(parsed_url) print(r) } + if (httr::status_code(r) >= 400) { + print("Error:") + print(httr::content(r)) + } stop_for_status(r) cr = content(r)$`search-results` L = list(get_statement = r, content = cr)