Try this:
# No error messages because it succeeds.
curl http://www.shikadi.net/ --fail --silent --show-error
# This prints an error message to stderr
curl http://i.like.you.def.maybe/ --fail --silent --show-error
Thanks to Russell Davis’s answer on this page, man curl
, and trial and error.
For the curious, here is the wget
version of the question: https://superuser.com/questions/420120/wget-is-silent-but-it-displays-error-messages