openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
259 stars 115 forks source link

Serializing,streaming mode should return 500 when exit code is non-zero #12

Open alexellis opened 6 years ago

alexellis commented 6 years ago

Serializing & streaming mode should return 500 when exit code is non-zero

Unlike the classic watchdog it is returning 200 despite a non-zero exit code.

Example:

port=8081 mode=serializing fprocess="stat x" ./of-watchdog

curl localhost:8081 -i
HTTP/1.1 200 OK

stat x should clearly return a non-zero exit-code and a message to stderr.

ericstoekl commented 6 years ago

I have been looking at the code and I think I have a solution for this -- I'll take this issue if that's ok.