fix: soo many lint errors
This commit is contained in:
@@ -48,7 +48,14 @@ async function processCreateRecipeFromUrl(
|
||||
}
|
||||
|
||||
if (!recipe) {
|
||||
recipe = await openai.extractRecipe(result.content);
|
||||
const res = await openai.extractRecipe(result.content);
|
||||
if (!res || "errorMessages" in res) {
|
||||
const errorMessage = res?.errorMessages?.[0] ||
|
||||
"could not extract recipe";
|
||||
streamResponse.enqueue(`failed to extract recipe: ${errorMessage}`);
|
||||
return;
|
||||
}
|
||||
recipe = res;
|
||||
}
|
||||
|
||||
const id = safeFileName(recipe?.name || "");
|
||||
|
||||
Reference in New Issue
Block a user