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

Add custom error file to handle unmatched URLs #347

Open
nozomione opened this issue May 29, 2024 · 0 comments
Open

Add custom error file to handle unmatched URLs #347

nozomione opened this issue May 29, 2024 · 0 comments
Assignees

Comments

@nozomione
Copy link
Member

Context

Resources: Next.js: not-found.js

Currently we're using the page router's _error.js to handle unmatched URLs in our application. In the app router, we can use not-found.js to handle a 404 HTTP status.

We'll need to create a note-found.js for handling 404.

Problem or idea

As stated above, create a custom not-found error file to handle the application's mismatched URLs.

Solution or next step

  1. Create a not-found.js file to handle 404 in the app folder
  2. Import shared/Error/Custom404 into the file.
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

No branches or pull requests

1 participant