config_message {googleErrorReportingR}R Documentation

Format messages before sending to Google Error Reporting

Description

Format messages before sending to Google Error Reporting

Usage

config_message(message, req, status_code)

Arguments

message

Error message returned by validation

req

Request object used by plumber

status_code

Valid HTTP status code

Value

formatted message

Examples

## 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)

[Package googleErrorReportingR version 0.0.4 Index]