Skip to content

Commit

Permalink
fix: return status even on error
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHWade committed Mar 2, 2024
1 parent 0dc4c27 commit 09f497d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/harvest-docs.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ check_url <- function(url) {
try(
{
httr2::request(url) |>
httr2::req_error(is_error = function(resp) FALSE) |>
httr2::req_error(is_error = \(resp) FALSE) |>
httr2::req_perform() |>
httr2::resp_status()
},
TRUE
)

if (inherits(status, "try-error")) return(invisible(FALSE))
status
}

Expand Down

0 comments on commit 09f497d

Please sign in to comment.