Yes, you can have Nextflow decide what to do (abort? ignore? retry?) when facing a task failure with the errorStrategy process directive. You can read more about it here. It’s a very powerful feature. Check some nice examples here, in our community training material
As for printing a list of the failed samples, there’s no such feature by default, but you can get this based on log/trace files and the tag process directive.