Re: Webhook sends invalid messages every once in a while

Anonymous
Not applicable

Webhook sends invalid messages every once in a while

Hi, on some cases, i get an invalid request from webhook which results on this error on my side:

org.json.JSONException: Unterminated string at character 121 of {"type":"Stam","name":"Enrich Marketo","externalId":4175828,"firstName":"Kathy","lastName":"Beal","email":"kcb

Seems like the request from marketo got cut off.
Any idea what can cause this?
thanks
Tags (1)
5 REPLIES 5
Anonymous
Not applicable

Re: Webhook sends invalid messages every once in a while

Amnon,
org.json.JSONException is a Java exception at your end caused by malformed JSON.  Either the webhook template has invalid JSON or the token escape format in webhook admin is incorrect. We need more information to investigate - can you please log a support ticket?

Raj
Anonymous
Not applicable

Re: Webhook sends invalid messages every once in a while

How do i check the token escape format in the webhook admin to see if something is wrong there?

I would like to note that this does not happen on every webhook send so this does not seem to be like a configuration issue, otherwise i would expect this to happen every time.
Anonymous
Not applicable

Re: Webhook sends invalid messages every once in a while

That indeed sounds like an escaping problem.  If you could isolate the lead for whom the WH call failed, I'd recommend testing for that lead on http://requestb.in/.  To do so, follow these steps -
  1. create a new requestbin
  2. clone your WH definition
  3. Change WH endpoint to requestbin endpoint from step #1
  4. Trigger the WH
  5. Inspect details of the WH data on requestbin
Anonymous
Not applicable

Re: Webhook sends invalid messages every once in a while

This is a great tool, thanks for this.
But, the problem is that the webhook is defined on our customer's marketo instances. And this problem does not reproduce on every request. it can happen once in a while.
So, i can't ask our customers to send requests to the bean all the time until it is reproduced.
Is there anything else I can try?
thanks,
Anonymous
Not applicable

Re: Webhook sends invalid messages every once in a while

If you could filter out the webhooks that failed (there is a filter for that), you'll have to send only one of those to requestBin.