Skip to content

Commit

Permalink
trap funky url
Browse files Browse the repository at this point in the history
  • Loading branch information
khufkens committed Aug 21, 2024
1 parent 6904149 commit e75aa99
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions R/wf_delete.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@ wf_delete <- function(
key <- wf_get_key(user = user)

# get the response for the query provided
response <- httr::DELETE(
response <- try(httr::DELETE(
url,
httr::add_headers(
"PRIVATE-TOKEN" = key
)
)
)

# trap general http error, otherwise report success
if (httr::http_error(response)) {
if (httr::http_error(response) || inherits(response, "try-error")) {
warning("Request not purged from queue, check download!")
} else {
if (verbose){
Expand Down

0 comments on commit e75aa99

Please sign in to comment.