fix: report malformed application evidence as input errors

This commit is contained in:
morluto
2026-10-10 03:52:35 +08:00
parent 55a46f7c71
commit 218c13160e
15 changed files with 613 additions and 165 deletions
@@ -15,7 +15,9 @@ const analyze = async (root: string) => {
format: "directory",
});
if (!result.ok) throw result.error;
const authenticated = parseApplicationGraphEvidence(result.value);
const parsed = parseApplicationGraphEvidence(result.value);
if (!parsed.ok) throw new Error("Analysis Evidence must parse");
const authenticated = parsed.value;
return {
graph: authenticated.graph,
result: javascriptApplicationAnalysisResultSchema.parse(