Skip to content

Commit 74733d2

Browse files
Javascript: Changes default behavior to wait for Job Run State checks. (#7107)
Co-authored-by: David Souther <davidsouther+github@gmail.com>
1 parent 3f7e820 commit 74733d2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

javascriptv3/example_code/glue/scenarios/basic/steps/start-job-run.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,14 @@ const waitForJobRun = async (getJobRun, jobName, jobRunId) => {
2323
case "FAILED":
2424
case "TIMEOUT":
2525
case "STOPPED":
26+
case "ERROR":
2627
throw new Error(
2728
`Job ${JobRun.JobRunState}. Error: ${JobRun.ErrorMessage}`,
2829
);
29-
case "RUNNING":
30-
break;
3130
case "SUCCEEDED":
3231
return;
3332
default:
34-
throw new Error(`Unknown job run state: ${JobRun.JobRunState}`);
33+
break;
3534
}
3635

3736
log(

0 commit comments

Comments
 (0)