Debugging Webhooks

I’ve been testing my webhooks endpoint with external clients and response 204 is given correctly.

But on the app monitor all fired webhook events are listed as “HTTP host connection error”

How may I debug this?

Hi @dwaynemac ,

By ‘app monitor’, do you mean the workflow logs or do you mean the application that is receiving the post request from the webhook?

If it is an application you wrote yourself, could you explain what technique you used so we can help you debug? Did you use PHP, NodeJS (Express) or another solution?

By ‘app monitor’ I meant this link: Developers | HubSpot

The app is written by myself. It’s on RubyOnRails, hosted on AWS, with a LetsEncrypt certificate.

I tested the webhook endpoint with https://paw.cloud/ with the ‘validate certificate’ enabled and it worked fine from there.

So if I read your post correctly, your app is giving a valid response (204) on the endpoint the webhook is pointing to? Cause if no response is given to the webhooks POST request, that will result in an error.

Yes, my app is responding with 204.

But I tried responding “ok” and 202 and had de same problem.

What’s the expected response by HubSpot?

@dwaynemac Could you try to respond with 200? I checked a few of my applications and the workflow should work with a 200 response.

nope. still not working after changing responde to 200.

@dwaynemac How long does it take your server to respond?
I found the following in another post:

HubSpot will retry in the following cases:

  • Connection Failed - If we cannot open an http connection to the provided webhook URL
  • Timeout - If your service takes longer than 5 seconds to send back a response to a batch of notifications
  • Error codes - If your service responds with an HTTP status code that is not one of: 400, 401, 403, 404, 405

Could it be that you are experiencing a timeout?
There are some solutions available here.

Definetly under 5 seconds

My issue seems to be the same of the post you linked but there is no solution there either

Thanks for the additional info! If the response is given within 5 seconds, that can not be the issue.
@dennisedson Could you help us out?

@dwaynemac , I am looking into this. Will let you know what I figure out

Thank you! Looking forward to your input.

Looks like you have an SSL issue.

I ran a post to your request url and received this:

thanks!

Ok! Some tweaking on my ssl configuration seem to have solved the issue. thanks!