How 'ignore' errorStrategy actually works?

Hello,

It seems that I am totally confused by how the ‘ignore’ errorStrategy is supposed to work. According to the documentation, I thought if i set it to ignore, the pipeline will continue to work. However, I have a simple process that uses fasterq-dump to extract fastq files from .sra files and sometimes this tool fails with exit code 3.

I have this error strategy in the config:

process {    
   errorStrategy = {
        if (task.attempt <= 2) {
            'retry'
        }
        else {
            'ignore'
        }
    }
}

Also i have set:

workflow {
    failOnIgnore = false
}

Once fasterq-dump fails, nextflow retries according to my request but once we are out of all retries, nextflow reports the entire run as failure. Why is that?

Also I have another case when AWS Batch preempts my spot instance task, it is also getting retried but after 2 retries, the entire run is a failure.

How is it possible to make nextflow actually ignore the errors?

      N E X T F L O W
      version 25.10.3 build 10983
      created 22-01-2026 15:34 UTC (16:34 CEST)
      cite doi:10.1038/nbt.3820
      http://nextflow.io

Thanks!

@legezam , I got a working test case for you.

instead of defining the errorStrategy in the config file

I declared it in the process directive and it worked for me.

It ran the first 2 times using retry then the third time using ignore


process showParams {
    debug true
    errorStrategy { 
        task.attempt <= 2 ? 'retry' : 'ignore'
    }
    maxRetries 2

    script:
    """
    exit 1
    echo "Workflow parameters:"
    echo "  greeting: ${params.greeting ?: 'Hello'}"
    echo "  name: ${params.name ?: 'World'}"
    """
}

note: maxRetries = 2 will work.

N E X T F L O W ~ version 24.05.0-edge

PS:

I think the workflow.failOnIgnore is regulating sometime else, I played with true/false and it does not seems to impact the nextflow run visually, but when i check the exit code of the nextflow run command exit code itself (pipeline level exit code)

echo $?

it is changing between 0 and 1 with workflow.failOnIgnore

workflow {
    failOnIgnore = true/false
}

I think this workflow.failOnIgnore feature is for cloud launch or hpc launch error code captures.

Actually, i think oneline will solve your issue

Add

maxRetries = 2

I tested the following it worked as expected.

process {    
    maxRetries = 2
    errorStrategy = {
        if (task.attempt <= 2) {
            'retry'
        }
        else {
            'ignore'
        }
    }
}
workflow {
    failOnIgnore = false
}

Reason I think nextflow needs the maxRetries to set up retry correctly.

@yinshiyi , thanks for looking into it! Could you clarify whether defining it at process level or adding maxRetries would fix the issue?

@legezam adding maxRetries would fix the issue.