Returning HTTP status codes
smox opened this issue · 4 comments
smox commented
Hello,
I want to send errors back when the parameters are wrong and I think it is not a nice way to send an error back with 200 OK.
Is there a way to set the HTTP status code of the response?
ncarlier commented
Hello, the script execution is returned in real time by Webhookd using a streamed HTTP response (Server Sent Event). Because of that, the HTTP code is already sent before the script execution starts. Therefore a problem detected within the script cannot influence the return code.
johntdyer commented
Thats a shame, I could see real value in a simple tool to run a script / tool and have the exit code of that script determine the http response code to the originating client making the request