Closed rchl closed 2 years ago
This code seems to only parse body for requests with content-type application/json or application/x-sentry-envelope:
application/json
application/x-sentry-envelope
https://github.com/wix/sentry-testkit/blob/a210f7389ae414b0cdc707682bfea70f672138a2/src/localServerApi.js#L25
But in practice Sentry seems to be sending payloads with Content-Type: text/plain;charset=UTF-8 header so the payload is not parsed and fails when handling the request:
Content-Type: text/plain;charset=UTF-8
https://github.com/wix/sentry-testkit/blob/a210f7389ae414b0cdc707682bfea70f672138a2/src/localServerApi.js#L32-L33
I dont see any reason why not expand the type to text/plain. you're welcome to PR!
text/plain
This code seems to only parse body for requests with content-type
application/json
orapplication/x-sentry-envelope
:https://github.com/wix/sentry-testkit/blob/a210f7389ae414b0cdc707682bfea70f672138a2/src/localServerApi.js#L25
But in practice Sentry seems to be sending payloads with
Content-Type: text/plain;charset=UTF-8
header so the payload is not parsed and fails when handling the request:https://github.com/wix/sentry-testkit/blob/a210f7389ae414b0cdc707682bfea70f672138a2/src/localServerApi.js#L32-L33