From my reading of the docs --fail just changes the output when curl fails. The exit code is still propagated as expected.