Skip to content

Commit a11cde1

Browse files
authored
Merge pull request #78 from MaxLinCode/claude/interpret-logging
fix: log interpretWriteTurn failures instead of silently falling back
2 parents 9ede728 + 1050b3d commit a11cde1

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

apps/web/src/lib/server/interpret-write-turn.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,19 @@ export async function interpretWriteTurn(
1818
const parsed = rawWriteInterpretationSchema.safeParse(raw);
1919

2020
if (!parsed.success) {
21+
console.error("interpret_write_turn_parse_failed", {
22+
zodError: parsed.error.format(),
23+
rawOutput: raw,
24+
});
2125
return fallbackInterpretation(input);
2226
}
2327

2428
return normalizeRawWriteInterpretation(parsed.data, input.currentTurnText);
25-
} catch {
29+
} catch (err) {
30+
console.error("interpret_write_turn_error", {
31+
error: err instanceof Error ? err.message : String(err),
32+
stack: err instanceof Error ? err.stack : undefined,
33+
});
2634
return fallbackInterpretation(input);
2735
}
2836
}

0 commit comments

Comments
 (0)