gridhook icon indicating copy to clipboard operation
gridhook copied to clipboard

MultiJson::LoadError - Found multiple JSON objects in the stream but no block or the on_parse_complete callback was assigned to handle them.

Open baligam opened this issue 11 years ago • 3 comments

Recently we started getting the following error, each time we receive post event from SendGrid. As you can see from the Gemfile, we got the latest gridhook version. It may have something to do with the recent changes in SendGrid web hook API's, even though their support ensured us that we stayed on the older version of the API so the change shouldn't have affected us.

Full error stack: http://pastebin.com/zZm2nCGp

Our gemfile: http://pastebin.com/1AzfvhXY

Web Hook API change announcement http://blog.sendgrid.com/announcing-new-version-event-notification-webhook/

baligam avatar Oct 07 '13 17:10 baligam

For an immediate fix you could try to roll back to ref: fcbd824c28ef5e87b51594830e2b977524368ec0 in your gemfile.

If you can get a copy of the payload that is causing the error I'm sure we can create a test case for it and get it work under MultiJson, too.

stereoscott avatar Oct 07 '13 17:10 stereoscott

Hi Scott, The error happens with 0.2 version of GridHook as well as with 0.2.1.

Here's an example command you can use to simulate the post event that SendGrid send (from their v2 doc at http://sendgrid.com/docs/API_Reference/Webhooks/event_deprecated.html):

curl -i -d '[email protected]&arg2=2&arg1=1&category=testing&event=processed'

baligam avatar Oct 08 '13 07:10 baligam

Scott, going back to GridHook to 0.1.4 resolved the issue!

baligam avatar Oct 08 '13 07:10 baligam