-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
final #2725
base: master
Are you sure you want to change the base?
final #2725
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your implementation is almost there! 🎉 However, the error handling in the getAll
function needs improvement to meet the task requirements. Providing more informative error messages or handling specific error cases will enhance the user experience. Once you address this, your code will be in great shape! Keep up the good work! 😊
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
🔄 Fix the issues, commit the changes, and then re-request my review using the Re-request review
button in the Reviewers tab.
src/api/goods.ts
Outdated
return fetch(API_URL).then(response => { | ||
if (response.ok) { | ||
return response.json(); | ||
} | ||
|
||
throw new Error(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error handling in the getAll
function is very basic. According to the checklist, you should handle possible errors when making a request to the server. Consider providing a more informative error message or handling specific error cases to improve the user experience.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, the pull request review was unsuccessful for the following reasons:
Warning
No changes were made in the pull request since the last review. Please make sure that you have added files to the pull request and committed the changes.
[CODE: 7]
If the issue is within your control, please address it.
The next review attempt will automatically launch in 1 hour.
If you believe this is an error or need assistance, please contact the support team.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job on implementing the App
component and related functions! 🎉 Your code meets the task requirements and constraints, and you've successfully addressed previous feedback regarding error handling in the getAll
function. Here are some key points from the review:
-
Error Handling: You've improved the
getAll
function by adding proper error handling, which is crucial for robust applications. Well done! -
GoodsList
Component: This component is implemented correctly, using best practices like styling each item with the color of theGood
object and using theid
as a key. -
Functions in
goods.ts
: These are implemented correctly, withget5First
andgetRedGoods
effectively utilizinggetAll
to process data.
While your code is solid, always ensure that functions and components handle errors appropriately and optimize rendering when necessary. Although there are no critical issues, remember to review comments to refine your skills further. Keep up the great work, and continue learning from each task! 🚀
✨ Please rate this review in the Platform's notification center. I will be grateful for your feedback! ✨
No description provided.