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

Create error 404 page not found #54

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

dev129
Copy link
Contributor

@dev129 dev129 commented Oct 26, 2024

Closes: #50

Pull Request for Issue #50 : Implement Custom 404 Error Page

Overview:

This PR addresses issue #50 by implementing a custom 404 error page that will be displayed when a requested page is not found. The error page is designed to enhance user experience by attempting to retrieve the page data three times before displaying the error.

Changes Made:

  1. Error Handling in src/app/[username]/page.jsx:

    • The API now attempts to fetch the required data three times. If all attempts fail, the user will be redirected to the custom 404 error page.
  2. Custom 404 Error Page in src/app/not-found.jsx:

    • Created a visually appealing 404 error page featuring the classic GitHub Octocat image.
    • Added a theme-matching button that redirects users back to the home page when clicked.

Details:

  • The error handling logic ensures that users have multiple chances to access the desired content before encountering the error page.
  • The 404 page not only informs the user of the issue but also maintains a cohesive look with the application's theme, thanks to the styled button.

Testing:

  • Verified the functionality by simulating API failures and ensuring the 404 page loads correctly after three unsuccessful attempts.

Screenshots:
image

Next Steps:

  • Review and merge this PR to improve user navigation and error management within the application.

Thank you for considering this update! I look forward to your feedback.

Copy link

vercel bot commented Oct 26, 2024

@dev129 is attempting to deploy a commit to the vansh-codes1's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@dev129
Copy link
Contributor Author

dev129 commented Oct 26, 2024

Hi @vansh-codes , please check my code.

@vansh-codes vansh-codes self-requested a review October 26, 2024 18:49
@vansh-codes vansh-codes added enhancement New feature or request gssoc-ext GSSOC'24 Extd Participant level2 awards 25 points hacktoberfest-accepted hacktoberfest accepted labels Oct 26, 2024
@vansh-codes vansh-codes merged commit 13ed663 into vansh-codes:master Oct 26, 2024
1 of 2 checks passed
@dev129 dev129 deleted the feat-error404 branch October 28, 2024 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gssoc-ext GSSOC'24 Extd Participant hacktoberfest-accepted hacktoberfest accepted level2 awards 25 points
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: Improve design of error 404 page
2 participants