By default curl doesn't return a non-zero exit code when it receives a HTTP error, e.g. even if http://binderhub/health returns a 500 error curl will exit with 0.
--fail-with-body should ensure it exits with an error code, whilst still showing the retrieved content (-f exits with an error code but doesn't display the content).
By default curl doesn't return a non-zero exit code when it receives a HTTP error, e.g. even if
http://binderhub/health
returns a 500 error curl will exit with 0.--fail-with-body
should ensure it exits with an error code, whilst still showing the retrieved content (-f
exits with an error code but doesn't display the content).