Hello, there are several reasons for why you might be getting an HTTP 400 error from the webhook receiver. Your LMS logs should provide more information. Have you checked those?
Currently, it seems as if the 400 error is being caused by malformed data as it was explained in the readme. I believe it might be erroring before interacting with the oauth lms toolkit app, so other lms logs aren’t showing anything.
The JSON package from shopify also contains the email and a matching SKU. We also included the email in the cart notes section just in case:
Hmmm, this shouldn’t be all the logs you’re getting. The webhook receiver shouldn’t throw a 400 without invoking a logger.error() call before. Are you sure you’ve checked all relevant logs?
After reviewing all of the logs available and testing a few more times, the only error messages thrown are from caddy and webhook receiver. Reverse proxy request does go through caddy but the plugin returns error 400 with the bad request message. The logging mode was left at default. Shopify is sending the payload but it is being rejected by the webhook receiver with the 400 message.
Could this be due to an error in the hostname? or something wrong with the webhook from shopify?
Thanks for the prompt response again. Appreciate a lot.
Sorry for the late reply. We’ve rechecked from the beginning and fully rebuilt the system. After rebuilt, the webhook receiver function is now working properly before we even test Add log message for unhandled exceptions in receive_json_webhook(). We believe the issue may have been caused by an error in our setup or launch process.
We really appreciate your prompt support and the clear guideline. Thanks a lot for your help!
OK, now that you’ve redeployed your system and it’s working, could you please outline what differences you’ve found between your current setup and the one you previously had? That might be useful to other users who run into a similar issue, and help them troubleshoot.