R/utils-success_check.R

# success check utility
success_check <- function(result) {
  if (!result$success) {
    stop(paste(
      "Error code:", result$error$code, "\n",
      "Error type:", result$error$type, "\n",
      "Error message:", result$error$info
    ), call. = FALSE)
  }

  result
}

Try the fixerapi package in your browser

Any scripts or data that you put into this service are public.

fixerapi documentation built on May 2, 2019, 10:32 a.m.