It may turn out that someone here has similar experience of handling webhooks with KM and can intuit what is going on. Otherwise I think you are going to have to cough up some precise details. For example: "KM tries to pass this output to macOS". How? Precisely what output? What KM Actions are involved?
Points 2 and 3 in this post might help.