When investigating T99775 we found out a QUnit job to have an erroring curl command which does not terminate the build:
curl --include http://.../Special:BlankPage | head -n42 (23) Failed writing body
As pointed by @JanZerebecki:
So we need set -o pipefail and die out with a nice message that points people to the error logs artifacts.