[sandbox] Catch failed fetch
This commit is contained in:
parent
1582e7a480
commit
5280a25d4d
@ -106,7 +106,14 @@ const repoUrl = process.env.REPO_URL as string;
|
|||||||
const javaBinPath = process.env.JAVA_PATH as string;
|
const javaBinPath = process.env.JAVA_PATH as string;
|
||||||
|
|
||||||
async function loop() {
|
async function loop() {
|
||||||
const submissionData = await fetchQueuedSubmission();
|
let submissionData: SubmissionGetData | undefined;
|
||||||
|
try {
|
||||||
|
submissionData = await fetchQueuedSubmission();
|
||||||
|
} catch {
|
||||||
|
console.error('Failed to fetch submission');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!submissionData) {
|
if (!submissionData) {
|
||||||
console.error('Unable to fetch submission data');
|
console.error('Unable to fetch submission data');
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user