From 1462e6cd5f56f7a57381f88aebf5d7476a6b5768 Mon Sep 17 00:00:00 2001 From: David Blodgett Date: Wed, 30 Jul 2025 12:52:04 -0500 Subject: [PATCH] random issue with response from sciencebase --- R/REST_helpers.R | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/R/REST_helpers.R b/R/REST_helpers.R index cd00f59..d14ad85 100644 --- a/R/REST_helpers.R +++ b/R/REST_helpers.R @@ -126,6 +126,10 @@ handle_errors <- function(x, url, method, types) { return(NULL) } } + + if(grepl("getSBJSON\\(", rawToChar(x$content))) { + x$content <- charToRaw(gsub("\\);", "", gsub("getSBJSON\\(", "", rawToChar(x$content)))) + } if ('errors' %in% names(content(x))) {