gammapy / gamma-sky

Portal to the gamma-ray sky
http://gamma-sky.net/
MIT License
6 stars 3 forks source link

Behaviour for invalid routes #63

Closed cdeil closed 6 years ago

cdeil commented 7 years ago

I tried some invalid routes.

E.g. http://localhost:4200/spam results in a white screen and a JS error in the console.

E.g. http://localhost:4200/cat/tev/999 results in an empty source detail view.

@vorugantia - Can we do better?

I think a 404 "not found" page is pretty standard and shouldn't be hard to implement in the router? (see https://github.com/spam/spam for an example) Or maybe it is hard to implement for the source detail views where you have to check if the source_id exists?

vorugantia commented 6 years ago

For now, this issue can be closed. http://gamma-sky.net/spam has been fixed to re-direct to a 404.html page. http://gamma-sky.net/#/cat/tev/999 will just show an empty source detail page, but the page doesn't break - people can still search for a source in the searchbar.