diff --git a/src/library/tools/R/htmltools.R b/src/library/tools/R/htmltools.R
index 9d262d7e679..cf607e48cd5 100644
--- a/src/library/tools/R/htmltools.R
+++ b/src/library/tools/R/htmltools.R
@@ -56,7 +56,10 @@ function(files, verbose = interactive()) {
tidy_validate_R_httpd_path <-
function(path) {
- y <- httpd(path, query = NULL)
+ ##
+ ## What should we do if httpd() throws an error?
+ y <- tryCatch(httpd(path, query = NULL), error = identity)
+ ##
if(!is.null(f <- y$file)) {
## Should only do this for appropriate content types
if(is.null(y$"content-type"))