R/internals.R

Defines functions check_status

Documented in check_status

#' Check Status function
#'
#' @param res Response from API
#'
check_status <- function(res) {

  x = httr::status_code(res)

  if(x != 200) stop("The API returned an error", call. = FALSE)

}
JaseZiv/chessR documentation built on Oct. 13, 2024, 2:28 p.m.