[sandbox] Catch failed fetch

This commit is contained in:
orosmatthew 2023-05-08 21:21:14 -04:00
parent 1582e7a480
commit 5280a25d4d

View File

@ -106,7 +106,14 @@ const repoUrl = process.env.REPO_URL as string;
const javaBinPath = process.env.JAVA_PATH as string;
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) {
console.error('Unable to fetch submission data');
} else {