fix: openai error handling

This commit is contained in:
Timothy Jaeryang Baek
2025-08-11 17:00:06 +04:00
parent 8916a284bd
commit 97448e25ec
4 changed files with 36 additions and 6 deletions
+1 -1
View File
@@ -379,7 +379,7 @@ export const generateOpenAIChatCompletion = async (
return res.json();
})
.catch((err) => {
error = `${err?.detail ?? err}`;
error = err?.detail ?? err;
return null;
});