Here is a one-liner if anyone ever needs it. It will save the content returned (empty file if failed)
curl https://example.org --fail > example.html || echo 'curl failed'