Conversation
📝 HackYourFuture auto gradeAssignment Score: 100 / 100 ✅Status: ✅ Passed Test Details |
| } | ||
|
|
||
| // Category & Alcoholic | ||
| markdown += `**Category**: ${drink.strCategory || "Unknown"}\n`; |
| markdown += `\n`; | ||
|
|
||
| // Instructions | ||
| markdown += `### Instructions\n${drink.strInstructions || "No instructions provided."}\n\n`; |
| // Glass | ||
| markdown += `Serve in: ${drink.strGlass || "Unknown"}\n\n`; | ||
|
|
||
| markdown += `---\n\n`; |
There was a problem hiding this comment.
Bravo, I like that you introduced a line separator between recipes, this line could be even longer to make sure the user knows that this is the end.
| }); | ||
| if (!response.ok) { | ||
| throw new Error( | ||
| `Failed to get user: HTTP ${response.status} ${response.statusText}`, |
There was a problem hiding this comment.
see my main reviewed comment please about this line
| }); | ||
| if (!response.ok) { | ||
| throw new Error( | ||
| `Failed to create user: HTTP ${response.status} ${response.statusText}`, |
There was a problem hiding this comment.
see my main reviewed comment please about this line
| }); | ||
| if (!response.ok) | ||
| throw new Error( | ||
| `Failed to get user: HTTP ${response.status} ${response.statusText}`, |
There was a problem hiding this comment.
see my main reviewed comment please about this line
| }); | ||
| if (!response.ok) { | ||
| throw new Error( | ||
| `Failed to get user: HTTP ${response.status} ${response.statusText}`, |
There was a problem hiding this comment.
see my main reviewed comment please about this line
| }); | ||
| if (!response.ok) { | ||
| throw new Error( | ||
| `Failed to get user: HTTP ${response.status} ${response.statusText}`, |
There was a problem hiding this comment.
see my main reviewed comment please about this line
| }); | ||
| if (!response.ok) { | ||
| throw new Error( | ||
| `Failed to get user: HTTP ${response.status} ${response.statusText}`, |
There was a problem hiding this comment.
see my main reviewed comment please about this line
| }); | ||
| if (!response.ok) { | ||
| throw new Error( | ||
| `Failed to delete post: HTTP ${response.status} ${response.statusText}`, |
There was a problem hiding this comment.
see my main reviewed comment please about this line
JQnetherlands
left a comment
There was a problem hiding this comment.
Hello, Hannah.
I will start with the good news! you have passed both task successfully, you almost have exceeds expectations ( almost 5 starts), now I will go on with the nices to have.
About task 1 (I commented your code as well) , I loved that you introduced the --- line separator to let the user known that the receipt is finish (see my comment in the code), this is a very good thinking towards the user experience some \n were missing (after alcohol, instructions ), apart from this your task 1 is perfect.
About task 2, all your functions accomplish their goal , well done, each of one shows you do understand the CRUD and HTTP actions and what each Method needs to successfully fetch to the back end (GET, POST, UPDATE, DELETE).
The only feedback I have to write better code is the following:
Right now you have ---> Failed to delete post: HTTP ${response.status} ${response.statusText}
That would be ---> Failed to delete post: HTTP 403 forbidden
Do you think it is clear enough information for the user to know what went wrong?
Can you imagine a better statement for the user?
for example this you could do if you change your code a bit, I will give you the final expected output that I am talking about:
clearer output ---> Failed to delete post: HTTP 403 You can only modify your own posts
Do you see the difference? can you imagine how you could make your code give that example? HINT: maybe an inline conditional , do you know which one?
That you could apply to each function to make it more user friendly.
Again, you did super well overall, you passed successfully and almost beyond expectations, please be proud of yourself and keep the good work! Congratulations
No description provided.