Skip to content

Commit

Permalink
Merge pull request #602 from Sage-Bionetworks/fds-1282-surface-dataty…
Browse files Browse the repository at this point in the history
…pe-error

FDS 1282 Surface data type not found error
  • Loading branch information
afwillia authored Jun 10, 2024
2 parents 1f8dee8 + 2d5c20d commit 558eaa7
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 558eaa7

Please sign in to comment.