Skip to content

Commit

Permalink
Merge pull request #53 from seqeralabs/viralrecon_not_found
Browse files Browse the repository at this point in the history
Throw exception and terminate workflow in case config can't be read
  • Loading branch information
drpatelh authored Jul 25, 2024
2 parents 1baff7c + b75d358 commit c4c3a5a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/local/seqera_runs_dump/functions.nf
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
@Grab('com.github.groovy-wslite:groovy-wslite:1.1.2;transitive=false')
import wslite.rest.RESTClient
import groovy.json.JsonSlurper
import nextflow.exception.ProcessException

// Set system properties for custom Java trustStore
def setTrustStore(trustStorePath, trustStorePassword) {
Expand Down Expand Up @@ -60,12 +61,15 @@ Map getRunMetadata(meta, log, api_endpoint, trustStorePath, trustStorePassword)
↳ Status code ${ex.response?.statusCode} returned from request to ${ex.request?.url} (authentication headers excluded)
""".stripIndent()
log.error "Exception: ${ex.message}", ex
throw new ProcessException("Failed to get workflow details for workflow ${runId} in workspace ${meta.workspace}", ex)
} catch (Exception ex) {
log.warn """
An error occurred while getting workflow details for workflow ${runId} in workspace ${meta.workspace}:
${ex.message}
""".stripIndent()
log.error "Exception: ${ex.message}", ex
throw new ProcessException("Failed to get workflow details for workflow ${runId} in workspace ${meta.workspace}", ex)

}
return [:]
}

0 comments on commit c4c3a5a

Please sign in to comment.