Detect failed build for more informative error