Skip to content

Commit 9cd19d8

Browse files
committed
fix: capture error stack for codegen runtime errors
Whenever Genkit, or other runners throw an error during LLM response generation, we don't capture the stack. This makes debugging really hard.
1 parent 849123d commit 9cd19d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

runner/orchestration/codegen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export async function generateCodeWithAI(
6969
success = false;
7070
reasoning = '';
7171
toolLogs = [];
72-
errors.push(error + '');
72+
errors.push(`${error}${error instanceof Error ? `\nStack: ${error.stack}` : ''}`);
7373
}
7474

7575
return {

0 commit comments

Comments
 (0)