Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,14 @@ await fastify.register(async (instance) => {
throw new Error(`Unexpected populate claim outcome: ${populateOutcome}`);
}

const run = await populateWorkflow.createRun();
let run: Awaited<ReturnType<typeof populateWorkflow.createRun>>;
try {
run = await populateWorkflow.createRun();
} catch (runErr) {
req.log.error(runErr, "Failed to create workflow run; releasing dataset claim");
await setDatasetPopulateStatus(parsed.data.datasetId, "failed", statusErrorMessage(runErr));
Comment on lines +314 to +315
return reply.code(502).send({ error: "Failed to populate dataset. Please try again." });
Comment on lines +314 to +316
}

void runPopulateWorkflowInBackground({
input: parsed.data,
Expand Down