Set debug value to include error messages of routes cause an error
Source:R/pr_set.R
pr_set_debug.Rd
By default, error messages from your plumber routes are hidden, but can be
turned on by setting the debug value to TRUE
using this setter.
Examples
if (FALSE) { # \dontrun{
# Will contain the original error message
pr() %>%
pr_set_debug(TRUE) %>%
pr_get("/boom", function() stop("boom")) %>%
pr_run()
# Will NOT contain an error message
pr() %>%
pr_set_debug(FALSE) %>%
pr_get("/boom", function() stop("boom")) %>%
pr_run()
} # }
# Setting within a plumber file
#* @plumber
function(pr) {
pr %>%
pr_set_debug(TRUE)
}
#> function (pr)
#> {
#> pr %>% pr_set_debug(TRUE)
#> }
#> <environment: 0x55e2434026f8>