From f19874e4c766a1dc91b95e1950f6b6a090d227e8 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Wed, 11 Dec 2024 18:34:41 +0100 Subject: [PATCH] add error handling --- README.md | 76 ++++++++++++++++----------------- TODO.md | 7 ++- app.vue | 13 ++++++ bun.lockb | Bin 418401 -> 418401 bytes error.vue | 58 +++++++++++++++++++++++++ pages/[id].vue | 13 +++++- server/api/recipes/[id].get.ts | 14 +++++- types/id.ts | 8 ++++ 8 files changed, 147 insertions(+), 42 deletions(-) create mode 100644 error.vue create mode 100644 types/id.ts diff --git a/README.md b/README.md index f4195b5..ade2e85 100644 --- a/README.md +++ b/README.md @@ -29,45 +29,45 @@ Free meal planner for cooks short on ideas! (like me …) - Search by name: you look for a recipe? Ours are easy to make and Yummy! ✓ - What's in the fridge ? Choose your main ingredient and get a meal suggestion - Choose by a category: ✓ - - Beef - - Breakfast - - Chicken - - Dessert - - Goat - - Lamb - - Miscellaneous - - Pasta - - Pork - - Seafood - - Side - - Starter - - Vegan - - Vegetarian + - Beef + - Breakfast + - Chicken + - Dessert + - Goat + - Lamb + - Miscellaneous + - Pasta + - Pork + - Seafood + - Side + - Starter + - Vegan + - Vegetarian - Choose by area: - - American - - British - - Canadian - - Chinese - - Dutch - - Egyptian - - French - - Greek - - Indian - - Irish - - Italian - - Jamaican - - Japanese - - Kenyan - - Malaysian - - Mexican - - Moroccan - - Russian - - Spanish - - Thai - - Tunisian - - Turkish - - Unknown - - Vietnamese + - American + - British + - Canadian + - Chinese + - Dutch + - Egyptian + - French + - Greek + - Indian + - Irish + - Italian + - Jamaican + - Japanese + - Kenyan + - Malaysian + - Mexican + - Moroccan + - Russian + - Spanish + - Thai + - Tunisian + - Turkish + - Unknown + - Vietnamese - Cocktail selection - Create a profile and save your favourite meals ✓ - Notation system: know what are the most loved meals diff --git a/TODO.md b/TODO.md index de9f0fc..9d4bee6 100644 --- a/TODO.md +++ b/TODO.md @@ -7,7 +7,12 @@ - [x] deploy - [x] nuxt image - [x] prettier and eslint -- [ ] transition +- [ ] transition and loading times - [ ] pwa - [ ] seo, robots.txt - [x] update the README +- [ ] create image provider +- [ ] fetch recipe per id +- [ ] add mood section + - [ ] store recipes into my db (SQLite) + - [ ] process them using AI diff --git a/app.vue b/app.vue index ddc2027..5f597d2 100644 --- a/app.vue +++ b/app.vue @@ -7,3 +7,16 @@ + + diff --git a/bun.lockb b/bun.lockb index d7cc001e447830509b67ca7129b60b22b44b4c88..bb8092e20f80206cc913a6e3d54236c7fb1115c7 100755 GIT binary patch delta 40 ucmaEOMDpPg$%Yoj7N!>FEiBo#9E@?sdPc^27VX8hEI`bFEiBo#983%l&|YlI0>rG_i*4E7sQ>^Ev +
+
+
+
+ +
+ + + +
+ + +

+ {{ error?.statusCode || "Error" }} +

+

+ {{ error?.message || "Something went wrong" }} +

+ + +
+ + +
+
+
+
+
+ + + diff --git a/pages/[id].vue b/pages/[id].vue index 17688d7..5234871 100644 --- a/pages/[id].vue +++ b/pages/[id].vue @@ -1,6 +1,17 @@