Open rubenhelsloot opened 2 years ago
@rubenhelsloot thank you for raising this issues. I have added it to my todos and hopefully will get a chance to look at it in the coming months.
Just stumbled on this problem myself but Picker seems to be going away in favour of (express core functionality?) in Meteor 3 so maybe not worth fixing.
Thank you for reviving this package!
I wanted to ask to open issue #12 here too, because it's highly relevant.
Situation
I maintain an application that accepts incoming webhooks from Shopify. The data on that webhook is sent in JSON format, so I've registered a
bodyparser.json()
middleware in Picker. Normally, I then check that the hash of the JSON body is the same as the value of one of the request headers. This is also described in their docs.However, when the body size is too large,
req.body
is empty with no warning whatsoever. Calculating the hmac fails and the webhook is aborted. But the true error happened way earlier in the request, namely when the middleware parsing failed. Ideally, I'd want to have been notified on parse error, not later.A subset of my code: