View source: R/config_message.R
config_message | R Documentation |
Format messages before sending to Google Error Reporting
config_message(message, req, status_code)
message |
Error message returned by validation |
req |
Request object used by plumber |
status_code |
Valid HTTP status code |
formatted message
## Not run: your_function_call <- tryCatch( your_function(), error = function(e) { message$message <- as.character(e) googleErrorReportingR::report_error(message) message <- config_message(message, req, "401") stop("Error", call. = FALSE) }) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.