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 404 pages for invalid links #23

Open
Ant1ng2 opened this issue Mar 29, 2021 · 1 comment
Open

Add 404 pages for invalid links #23

Ant1ng2 opened this issue Mar 29, 2021 · 1 comment
Assignees
Labels
bug Something isn't working. enhancement This is a new feature or request. good first issue This is good for newcomers.

Comments

@Ant1ng2
Copy link
Contributor

Ant1ng2 commented Mar 29, 2021

There is a default 404 page when a link doesn't exist.
Here are examples in which it works with:

The following pages do not display a 404 page when they should be:

Assignment: Fix the missing 404 pages. I recommend looking at vueRouter.ts

@Penguinlay Penguinlay added bug Something isn't working. enhancement This is a new feature or request. good first issue This is good for newcomers. labels Apr 1, 2021
@Penguinlay
Copy link
Member

For insights into what is happening, those pages above where 404 page does not work are because of dynamic data. We don't know if those pages are valid or not until we load the data, say games or puzzles or their variants from the server.

There are two ways to handle it. One is with Vue Router where you would check the list of games returned from server to see if the route is valid or not. This method defeats the purpose of separations of concerns since you will be calling the API in Vue-Router.

Say you will handle the issue in the concerned component instead. Then, you should either provide conditional rendering based on server return. Here, you can either conditionally show right in the component or forward the handling to 404 page. In the latter case, you would need to update 404 page to handle those redirects.

In either cases, you somehow need to handle the unknown of whether the page does not work because of lack of games (or variants) or server fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. enhancement This is a new feature or request. good first issue This is good for newcomers.
Projects
None yet
Development

No branches or pull requests

3 participants