sentry-webhooks
sentry-webhooks copied to clipboard
JS not able to parse simplejson dump payload
I explored that this webhook sends data after encoding it using simplejson. Since nothing similar to simplejson exist in JS, it's difficult to decode back to original JSON format. How to go on this?
Either encode in a scheme which could be reversed using standard packages or don't encode it (which could not be the case of course) My team urgently needs to fix this, any help would be appreciated.
Is the payload you're getting valid JSON? Why can't it be parsed?
No it's not a valid json.
Can you give me an example of something that isn't valid JSON? If that's the case, that's extremely bizarre. simplejson just happens to be a library that implements JSON. It's not it's own flavor or variant of JSON. I've never seen anything from our API or webhooks that aren't JSON compatible. Considering our API is entirely consumed by our frontend JavaScript without any tricks.
Also, this repository isn't really used anymore and is super old. Everything regarding webhooks is in Sentry core.
A payload which we are getting via webhook contains body inside single quotes and the content inside these single quotes must be a valid JSON which is not. Node js JSON.parse() gives error while parsing it.
Can you provide an example? Really hard to tell without an example.
Yes, your email id? It's our internal payload.