Closed maxiimillian closed 1 month ago
HI @maxiimillian! I am able to reproduce this. Will create a PR for this
Thanks for having a look, just a heads up I believe this will set validate to true even when its been set in the options, since if validate is false, if (!options.validate) will be true.
Maybe a !('validate' in options) or (options.validate === undefined) would work better.
Yeah that makes sense, I'll make the change
@maxiimillian please check the PR now
Looks good
Issue Summary
The comments above the webhook middleware function say that the optional validate property will default to true, however this is only the case when no options are passed in,
Steps to Reproduce
validate
property. Make sure that the options will make the request invalid.Existing Code
if (!options) { options = { validate: true, }; }
I think the documentation should state this clearly or should actually set the validate to true if its not being set