Hello,
We’re registering the webhook in Clover app and Clover is unable to send a response to protocol thread, it keeps throwing an error for “Unable to reach callback URL”.
I’ve contact Clover about this issue and mentioned them that this URL was working before without causing any issue and they’ve checked the details and replied to me with below:
If I check the Clover’s webhook
doc it says the same that “The response to the server’s request from your URL must be a 200 OK code”.
I’ve also mentioned to them that this same URL is working for Clover’s
production but not for
Sandbox.
Thanks
Can you reproduce that on the dev.apiant system and send me the curl command so I can troubleshoot the problem?
The curl command: curl -v -X POST https://dev.apiant.com/webhook/protocol--b7c90cd25da9480d89c05ce2aa6836f4 -H “Content-Type: application/json” -d {“verificationCode”:“ce7643c1-83ea-4218-abe6-da876c9c7a0a”}
Responds:
I ran an old copy of dev.apiant from March 2019 and it also responds with “200 200”. Are you sure this is why the webhooks stopped working? If so, then seemingly Clover made a recent change on their end.
This thread (and others I have found) indicates “200 200” is sent due to Tomcat behavior: https://www.experts-exchange.com/questions/29004817/Apache-2-4-18-delivering-Status-Code-200-200.html
This thread (and others) indicates it is wrong to rely on the “OK” string: https://stackoverflow.com/questions/52696556/jersey-responses-reason-phrase-is-inconsistent-in-tomcat-7-and-8-5
Future versions of Tomcat 9 and even HTTP/2 will remove the reason string altogether: https://http2.github.io/http2-spec/#rfc.section.8.1.2.4
Here is a long Tomcat thread about this: https://bz.apache.org/bugzilla/show_bug.cgi?id=60362
So Clover needs to fix their system to not rely on a reason string of “OK”. A “200” HTTP status code is enough to indicate success.
No! I don’t think that, this could be the reason for webhook stop working and I’m aware of webhook was working (with the same URL) before. And yes Clover has made a recent change on their end and right after that, the issue has started. I’ve explained them everything that it was working before but not now and webhook URL only working for Clover’s production account but not in Sandbox. I’ve also informed them that I’ve another sandbox account which has the same webhook URL registered and it’s working fine but unable to register the new webhook URL onward.
Thanks for explaining about webhook response and totally agreed. I’ll contact Clover with all the points you’ve mentioned.
Thanks again