feat: 404 pages → redirect to /workspaces
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

- main.py: @app.exception_handler(404) → RedirectResponse(/workspaces)
- dashboard.py: page_detail 404 → RedirectResponse(/workspaces)
- tests: test_styled_404_page → 302 redirect
- API paths (containing /api) still get JSON 404, not redirect
- 143 tests passent
This commit is contained in:
2026-07-21 13:51:31 -04:00
parent bf329a4ba0
commit 27352c84e5
2 changed files with 8 additions and 9 deletions
+3 -4
View File
@@ -1950,11 +1950,10 @@ def test_create_page_defaults_to_untitled(client):
def test_styled_404_page(client):
"""Unknown routes return a styled 404 HTML page."""
"""Unknown routes redirect to /workspaces."""
resp = client.get("/this-does-not-exist-xyz", follow_redirects=False)
assert resp.status_code == 404
assert "404" in resp.text
assert "FlowDeck" in resp.text
assert resp.status_code == 302
assert resp.headers.get("location") == "/workspaces"
def test_api_404_returns_json(client):