diff --git a/app/routers/home.py b/app/routers/home.py index d245734..7a62d0f 100644 --- a/app/routers/home.py +++ b/app/routers/home.py @@ -122,8 +122,11 @@ async def clear_user_data(request: Request): recipes = await recipe_service.list_recipes(actor_id, offset=0, limit=10000) for recipe in recipes: try: - await recipe_service.delete_recipe(recipe["recipe_id"], actor_id) - deleted["recipes"] += 1 + success, error = await recipe_service.delete_recipe(recipe["recipe_id"], actor_id) + if success: + deleted["recipes"] += 1 + else: + errors.append(f"Recipe {recipe['recipe_id']}: {error}") except Exception as e: errors.append(f"Recipe {recipe['recipe_id']}: {e}") except Exception as e: