sentry_error_handler {sentryR}R 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)

[Package sentryR version 1.1.2 Index]