I haven’t tried this with 5.0M1 yet. Google search says this:
The HPE_INVALID_CONSTANT error in Node.js typically arises when the HTTP parser encounters an issue interpreting the response from a server. This often indicates that the response is malformed or doesn’t conform to expected HTTP standards.
You could add some console.log statements for debugging and see if that gives any additional info.
By the way, if I were to start over on this, I think I would look at the webhook binding as then there is no need for the external script. I haven’t done that yet, but it seems like a good solution. However, node.js should work, there’s probably a simple problem.