jcpsantiago / sentryR

Unofficial R client for Sentry
https://jcpsantiago.github.io/sentryR/
Other
38 stars 14 forks source link

Default `sentry_error_handler` errors in R 4 #22

Closed afischer closed 1 year ago

afischer commented 2 years ago

Attempting to use sentryR with a plumber project in R 4 throws the following error when using the sentry_error_handler: missing value where TRUE/FALSE needed.

This appears to be because within the handler, req$HTTP_CONTENT_TYPE == "application/json" returns a logical(0) and not a boolean.

emilmahler commented 2 years ago

I just encountered the same error. It seems this package is dead without a fix :(

jwebbsoma commented 2 years ago

I am experiencing the same issue

jwebbsoma commented 2 years ago

Upon further testing, it appears this issue only occurs with GET requests (empty bodies). I was able to get POSTs working and even GET requests that include a body (tested in Postman). Unfortunately, modern browsers don't allow sending a GET request with a body so this is effectively non functional. Definitely quite the issue still but maybe not completely killing the package.

jwebbsoma commented 2 years ago

I made a PR to fix this issue: https://github.com/ozean12/sentryR/pull/23 just need a moderator to merge it and release a new version to the CRAN.

jcpsantiago commented 1 year ago

Sorry for the delay everyone! I stopped getting notifications from this repo. I guess better late than ever, right? 😓 Thank you @jwebbsoma ! PR merged. I will release the new version to CRAN too.