Closed ndiquattro closed 4 years ago
Thanks for trying it out! I have not encountered such an error so far, could you provide a minimal example?
It looks the issue was I wasn't setting a content type in my test requests from httr. The NULL
value in req$HTTP_CONTENT_TYPE
was causing glue
to fail here: https://github.com/ozean12/sentryR/blob/master/R/sentry.R#L82-L106 .
There seems to be a similar issue where not having req$postBody
available (e.g. in a GET
) causes an error here: https://github.com/ozean12/sentryR/blob/master/R/sentry.R#L75-L78 . It causes this error:
Error: lexical error: invalid char in json text.
NA
(right here) ------^
Of course, I may be making a different type of mistake in my request :)
humm seems like we did some hard assumptions there. I can reproduce the error with
#* @get /error
api.error <- withCapturedCalls(function(res, req){
stop('error')
})
I'll add some default "null" values in cases where those are not set, which is ok because those vars are not critical. I'll test it later and see if it fixes the issue
@ndiquattro could you check if the latest PR fixed your issue? I'm writing some tests currently
Hello, thanks for working on this package! I was trying to set it up and I'm running into this error when I make a request to my plumber API that intentionally creates an error:
Looking around, it seems like this is relevant: https://github.com/getsentry/sentry/issues/6978
But, not sure how to apply it to my issue. Thanks!