Skip to content

Commit

Permalink
improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderDevisscher committed Jul 25, 2024
1 parent 55434db commit f5c592e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/wfs_intersect.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ wfs_intersect <- function(df,
response <- httr::GET(url, query = query)
# Check if the request was successful
if (httr::http_type(response) != "text/csv") {
stop("Failed to get data from WFS. Status code: ", httr::status_code(response))
stop("Failed to get data from WFS. Status code: ", httr::status_code(response),
"http_type: ", httr::http_type(response), " expects text/csv")
}

# Parse the result
Expand Down

0 comments on commit f5c592e

Please sign in to comment.