Repository navigation
fix(web): render a 404 and a 500 inside the app's layout, with a link to the runs - #393
Merged
Merged
Conversation
… to the runs Both show their title and the way back to Runs, in the user's theme; a 500 never shows the error. The page does not read ?workspace= again, since an unknown one may be what failed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #389
What
A 404 and a 500 render
error.html: the app's layout, the page head ("Not found" or "Server error") and a link back to Runs, in the user's theme. A 500 shows nothing of the error. Flask's unstyled default page is gone. The handlers sit with the page context inweb/filters.py; on an error page the context skips?workspace=, because an unknown workspace is itself a 404 and would fail the error page again.Touches
routes · templates and static
Before and after
Rows:
/no-such-pagein light; in dark.Verified
/no-such-page,/job/no-such-joband/job/<job>?workspace=goneanswer 404 inside the layout with the Runs link; a view that raises answers 500 inside the layout without the exception's text.Risk
Every 404, a JSON route's included, now renders the full layout instead of Flask's page; a script reading only the status is unaffected. If the layout itself fails, Werkzeug's plain 500 is what remains. Undone by a revert.