-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Invalid URL loads a semi-blank page #8801
Comments
Indeed, and that's because that's not a "real" 404 page. You have a 404 when you go to an invalid URL, like http://localhost:8080/yolo but here you have a hashbang, so this is served by the Angular/React front end, and you are going to a route that does not exist. We should indeed correct that, and have some kind of "404 route" for Angular/React. |
@ruddell I checked your answer on SO and I have another solution in mind with Http Interceptor as described here (https://medium.com/@antwaneb/catch-and-handle-all-404-errors-from-your-webservice-in-angular-5-2269b717d78f) |
I have not worked on this. That solution looks better than mine as it handles the 404s for entities as well |
Overview of the issue
When I type a wrong url (something like localhost:8080/#/my-entity/123123/view or localhost:8080/#/unexistant-entity/) in a new tab/window, it loads a partially blank page instead a 404 page with only the footer visible with title [object Object]
(image)
Motivation for or Use Case
There is no 404 page. When entering an invalid url, the app should show it instead of partially displaying a page.
Reproduce the error
Related issues
Searched, but none found
Suggest a Fix
I tried @ruddell's advice (this one) but it didn't work so far.
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
Environment and Tools
java version "1.8.0_141"
Java(TM) SE Runtime Environment (build 1.8.0_141-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.141-b15, mixed mode)
git version 2.19.0.windows.1
node: v8.12.0
npm: 6.4.1
yeoman: 2.0.5
Docker version 18.06.1-ce, build e68fc7a
docker-compose version 1.22.0, build f46880fe
Congratulations, JHipster execution is complete!
Browsers and Operating System
I think it's irelevant.
The text was updated successfully, but these errors were encountered: