Closed b-long closed 8 years ago
Actually, that's wrong, since it's for any non-200 response it should message appropriately. I'll address that in my PR.
See http://rpackages.ianhowson.com/cran/httr/man/http_condition.html for handling multiple response conditions.
But in this case just calling httr::stop_for_status()
is probably fine.
Is there an advantage? Why not use something like this :
stop(paste0("An error occurred communicating with mailing list: 'https://stat.ethz.ch/mailman/admin/bioc-devel'. ","Server returned status: ",status_code(response)))
?
Not really any advantage, your example seems fine
As mentioned on Trello, this bug is currently affecting the build of a new package (metagenomeFeatures) on perceval: http://bioconductor.org/spb_reports/metagenomeFeatures_0.99.3_buildreport_20150930114959.html#perceval_check_anchor
Rather than doing an early return at this line : https://github.com/Bioconductor/BiocCheck/blob/master/R/checks.R#L1133 , it would be better for the check to error (as it is a true error condition for the build system to not be authenticated). This function will not run if it's invoked from a user's machine, since the
BIOC_DEVEL_PASSWORD
environment variable is not defined.As such, I'd recommend doing the following instead :
/cc @dtenenba @jimhester