I noticed that that is the response header, so that tab is showing you that your app is responding without a Content-Length. There is a second tab for the request that should have more information from the HubSpot request to help you debug further.
Yes, you can set the Content-Length header dynamically based on the length of the request body.
To do this, you will need to calculate the length of the request body and set the Content-Length header in the request header before triggering the webhook.
Here's an example of how to set the Content-Length header dynamically in a Node.js application:
req.write(requestBodyString); req.end(); In this example, the Content-Length header is set dynamically by calling Buffer.byteLength() on the stringified request body. This calculates the length of the request body in bytes and sets it as the value for the Content-Length header in the request header.
You can replace { hello: 'world' } with your own request body.
Setting the Content-Length header dynamically should allow you to receive the req.body in the API and avoid the "Maximum retries reached for this action, skipping" error message.
Please mark it as SOLUTION ACCEPTED if you like the solution.
Are you sending the webhook to an app you have control over? If so, your app is throwing a 500 error, so HubSpot attempts to retry the payload until it gives up.
Can you elaborate on your use case here? We need more information in order to help you solve your issue.
Content length header sets to 0 while triggering webhook
SOLVE
Hey @tominal, Yes i do have control over app, it gives 500 error because the request body is empty due to content length header is 0, If i set content length manually it is working fine. it should be calculated based on request body.
I noticed that that is the response header, so that tab is showing you that your app is responding without a Content-Length. There is a second tab for the request that should have more information from the HubSpot request to help you debug further.
Content length header sets to 0 while triggering webhook
SOLVE
Hi, @madddy👋 Thanks for reaching out. Let's see if we can get the conversation going — hey @tominal@louischausse, do you have any experience here? Or thoughts on additional details @madddy can provide to help with troubleshooting?