R/format_error_message.R
format_error_message.Rd
Format Error Message for Google Error Reporting
format_error_message(
message = "Error description",
service = "My Service",
version = "0.0.1",
method = "GET",
url = "https://example.com",
user_agent = "",
referrer = "",
response_status_code = "500",
remote_ip = "192.178.0.0.1",
user_id = "UserID",
filepath = "/",
line_number = 0,
function_name = "my_function"
)
the error message you want in the logs
the name of your service
the version of the service
the http method used for hte call
hte unique resource identifier that was called
the user agente identifier
the referrer to the service
http response code
remote ip
user id
filepath of the code where the error originates
line number where the error originates
function name where the error originates
message object, a list to be formated as JSON in the error report body