Skip to content

Commit 3f94608

Browse files
committed
keep callback response consistent
1 parent 57530c9 commit 3f94608

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/routes/api/run.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ const handleSuccessForSubmission = function (result: RunResponse) {
6161
// send a post request to callback
6262
(async () => {
6363
// 1. upload the result to s3 and get the url
64+
const code = result.stderr ? 400 : 200
6465
const {url} = await upload(result)
6566

6667
// 2. save the url in db
@@ -73,7 +74,7 @@ const handleSuccessForSubmission = function (result: RunResponse) {
7374
})
7475

7576
// make the callback request
76-
await axios.post(job.callback, {id: result.id, code: 200, outputs: [url]})
77+
await axios.post(job.callback, {id: result.id, code, outputs: [url]})
7778
})()
7879
break;
7980
}

0 commit comments

Comments
 (0)