curl -s / -S / -sS: Quiet but Keep Errors
-s alone hides errors too, which is the wrong default for a pipeline.
You want quiet progress output but loud failures. -sS is the combination that does that.
What it does
-s / --silent hides the progress meter and error messages. -S / --show-error tells curl to still print an error message even when silent. Together, -sS gives you clean output with no progress bar but a visible message when something breaks.
Common usage
curl -sS https://api.example.com/status
curl -fsS https://api.example.com/status # add --fail for status checks
curl -s https://api.example.com/x | jq .idFlags
| Flag | What it does |
|---|---|
| -s / --silent | Hide the progress meter and error messages |
| -S / --show-error | Show errors even in silent mode |
| -sS | Silent progress + visible errors (the CI sweet spot) |
| -v / --verbose | Print request/response headers for debugging |
In CI
Use -sS, not bare -s. With only -s, a failed transfer prints nothing and a piped command may consume empty output, hiding the cause. -S keeps the error line. Add -f so a 500 also fails the step: -fsS is a common, reliable combination.
Common errors in CI
A silent failure where the next command crashes on empty input usually means you used -s without -S and curl errored quietly. Switch to -sS to surface the message, and add -v temporarily to inspect headers when a request misbehaves.