-
Notifications
You must be signed in to change notification settings - Fork 25
Don't let the app crash on 404s #97
Don't let the app crash on 404s #97
Conversation
2b6377b
to
8044254
Compare
@fabriziosestito great work again! @lee-martin This probably belongs to a different discussion but as they are mentioned here: are we keeping the environments? it might make little sense making changes on them if they are going to go anyway. |
Hi @fabriziosestito , The why about the sending the environment in the This way, we need to guarantee that the environment is passed in the query, and the provided |
I think that the filtering is still needed, because we are using the If I can assume that the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks already like it's good to merge. Thanks!
gj 🏖️ |
This PR adds checks and adds error handling on every parametric route (e.g.
/hosts/:host
)It also adds tests for every handler.
WIP:
I am not sure on how the
NewLandscapeHandler
should behave, since it just tries to pull all the environments and then passes them to the view context, which does some filtering if theenvName
query param is passed or it just shows all the environments otherwise.See:
trento/web/environments.go
Line 62 in 2c9832f
I could cycle to check if the landscape exists, but I think I am missing some context here.
Thoughts?