fix: soo many lint errors

This commit is contained in:
Max Richter
2025-11-03 00:03:27 +01:00
parent c13420c3ab
commit 696082250d
41 changed files with 373 additions and 500 deletions

View File

@@ -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 || "");