Skip to content

Commit

Permalink
Safer response from getRunMetadata function
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Syme <[email protected]>
  • Loading branch information
robsyme committed Nov 24, 2023
1 parent de08e16 commit 70066c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/local/seqera_runs_dump/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Map getRunMetadata(meta, log) {
if (workspaceId) {
def workflowResponse = client.get(path: "/workflow/${runId}", query: ["workspaceId":workspaceId], headers: authHeader)
if (workflowResponse.statusCode == 200) {
return workflowResponse?.json?.workflow?.subMap("runName", "workDir")
metaMap = workflowResponse?.json?.workflow?.subMap("runName", "workDir")
return metaMap ?: [:]
}
}
} catch(Exception ex) {
Expand Down

0 comments on commit 70066c9

Please sign in to comment.