sentry_error_handler: Error handler with Sentry reporting

sentry_error_handlerR Documentation

Error handler with Sentry reporting

Description

Error handler with Sentry reporting

Usage

sentry_error_handler(req, res, error, ...)

Arguments

req

a plumber request object

res

a plumber response object

error

an error object

...

extra named variables for Sentry

Value

a list with response payload

Examples

## Not run: 
sentryR::configure_sentry(Sys.getenv("SENTRY_DSN"))
pr <- plumber::plumb("example_plumber.R")
pr$setErrorHandler(sentryR::sentry_error_handler)
pr$run()

## End(Not run)

sentryR documentation built on May 29, 2024, 8:18 a.m.