look for errors only when job has failed [fixes #63533638]