The body is parsed as UTF8, and we can understand the envelope has JSON metadata on first bytes till byte 0A.
But if the envelope has binary that is not compatible with UTF8, the data would be broken, and Sentry envelope endpoint fails.
Specifically, if the vendor has the Sentry Replay endpoint, it always goes to 500 error.
Suggested Solution
I can guess the example is written for express users, so it seeems we can use .raw() instead of .text().
API doc: https://expressjs.com/en/4x/api.html#express.raw
NOTE: Not sure. We don't test as it is. We're using another web framework.
Core or SDK?
Core Sentry product
Which part? Which one?
Sentry Tunnel
Description
In the doc, the following example can be found. page: https://docs.sentry.io/platforms/javascript/troubleshooting/ Section Using the
tunnel
OptionSee these points:
The body is parsed as UTF8, and we can understand the envelope has JSON metadata on first bytes till byte 0A. But if the envelope has binary that is not compatible with UTF8, the data would be broken, and Sentry envelope endpoint fails. Specifically, if the vendor has the Sentry Replay endpoint, it always goes to 500 error.
Suggested Solution
I can guess the example is written for express users, so it seeems we can use
.raw()
instead of.text()
. API doc: https://expressjs.com/en/4x/api.html#express.raw NOTE: Not sure. We don't test as it is. We're using another web framework.Off-Topic: I prefer following to get JSON segment. (But this doesn't affect the behaviour. No worry)