Skip to content

Commit

Permalink
update error handling for data type not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
lakikowolfe committed Jun 7, 2024
1 parent acc8e63 commit 61b3257
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/schematic_rest_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ check_success <- function(x){
if (tolower(status$category) == "success") {
return()
} else {
# Return content text for Data Type errors
if (grepl("LookupError: The DataType", httr::content(x, "text"))) {
stop(httr::content(x, "text"))
}

stop(sprintf("Response from server: %s", status$reason))
}
}
Expand Down

0 comments on commit 61b3257

Please sign in to comment.