Add check to see if jobs failed. If yes, stop the function

1 job for develop-autosubmit
in 37 seconds, using 0 compute credits, and was queued for 3 seconds