Skip to content

Commit

Permalink
fail nicely
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcaseb committed Sep 6, 2024
1 parent 1880ee6 commit 7257fb5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion R/update_pbp_participation.R
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,14 @@ release_pbp_participation <- function(season) {
}

progressr::with_progress({
plays <- obtain_plays()
plays <- purrr::possibly(obtain_plays)()
})

if (nrow(plays) == 0){
cli::cli_alert_warning("Can't access data. Quitting here.")
return(invisible(FALSE))
}

plays <- plays |>
dplyr::mutate(
game_id = as.character(game_id),
Expand Down

0 comments on commit 7257fb5

Please sign in to comment.