Skip to content
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

Implement Error Handling and Refactor Data Fetching in Profile Component #1170

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

berhili098
Copy link
Contributor

This pull request includes several changes to enhance error handling, update data, and improve the user experience. The most important changes include the addition of an ErrorBoundary component, updates to data fetching logic, and the inclusion of a new profile.

Error handling improvements:

  • Added ErrorBoundary component to catch and display errors in the application. (components/ErrorBoundary.jsx)
  • Wrapped the main component with ErrorBoundary in the _app.js file to ensure errors are caught and handled gracefully. (pages/_app.js)

Data fetching and user experience enhancements:

  • Improved error handling in the fetchData function to throw an error if the response is not okay and added an alert message in case of failure to load profiles. (pages/index.js) [1] [2]

Data updates:

  • Added a new profile berhili098.json to the ProfileList.json file. (components/ProfileList.json)
  • Created a new profile data file for berhili098. (public/data/berhili098.json)

Copy link

vercel bot commented Feb 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dev-find ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 6, 2025 2:09pm

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, @berhili098! 🎉 Thank you for opening a pull request. Your contribution is valuable and we appreciate your efforts to improve our project.

Soon the maintainers/owner will review it and provide you with feedback/suggestions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant