feat: 404 pages → redirect to /workspaces
- 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:
+3
-4
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user