Skip to content

Commit

Permalink
Catch errors from LLM client
Browse files Browse the repository at this point in the history
  • Loading branch information
olafurpg committed Oct 1, 2024
1 parent 7914f9a commit 9a4cfd7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/typescript-5.7-cody-client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ Example usage:
instruction: reviewInstruction,
},
commit
)
).catch((error) => {
console.error(`Failed to review commit ${commit.oid}`, error);
return [];
})
)
);
for (const diagnostic of diagnostics.flat()) {
Expand Down

0 comments on commit 9a4cfd7

Please sign in to comment.