Skip to content

Commit

Permalink
fix: correctly handle error message
Browse files Browse the repository at this point in the history
  • Loading branch information
lynchee-owo committed Mar 19, 2024
1 parent 9b3a4fe commit 1c1502e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/determineNextAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export async function determineNextAction(
// TODO: need to verify the new API error format
console.error("determineNextAction error:");
console.error(error);
if (error.includes("server error")) {
if (error.message.includes("server error")) {
// Problem with the OpenAI API, try again
if (notifyError) {
notifyError(error);
Expand Down

0 comments on commit 1c1502e

Please sign in to comment.