Pratical CURL commands return not 0 exit code if http status != 200 curl --silent --show-error --fail URL --silent hides the progress and error --show-error shows the error message hidden by --silent --fail returns an exit code > 0 when the request fails