AlexsLemonade / refinebio-web

Refinebio Web
https://staging.web.refine.bio
BSD 3-Clause "New" or "Revised" License
1 stars 0 forks source link

Add custom error file to handle unmatched URLs #347

Open nozomione opened 4 months ago

nozomione commented 4 months ago

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.