Skip to content

Commit

Permalink
Prevent NPE with null AWS Batch response
Browse files Browse the repository at this point in the history
Signed-off-by: Paolo Di Tommaso <[email protected]>
  • Loading branch information
pditommaso committed Nov 27, 2024
1 parent 308d5a5 commit 12fc1d6
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ class AwsBatchTaskHandler extends TaskHandler implements BatchHandler<String,Job
// retrieve the status for the specified job and along with the next batch
log.trace "[AWS BATCH] requesting describe jobs=${jobIdsToString(batchIds)}"
DescribeJobsResult resp = client.describeJobs(new DescribeJobsRequest().withJobs(batchIds))
if( !resp.getJobs() ) {
if( !resp || !resp.getJobs() ) {
log.debug "[AWS BATCH] cannot retrieve running status for job=$jobId"
return null
}
Expand Down

0 comments on commit 12fc1d6

Please sign in to comment.