From 6f9ef1c3942ace2266fcc1f7768bfa07a483545c Mon Sep 17 00:00:00 2001 From: Rightup Date: Fri, 4 Sep 2026 21:38:10 +0100 Subject: [PATCH] fix(stats): handle missing plugin argument in StatsApp routing --- repeater/web/http_server.py | 2 +- tests/test_http_server_unit.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/repeater/web/http_server.py b/repeater/web/http_server.py index 567e89c..565d718 100644 --- a/repeater/web/http_server.py +++ b/repeater/web/http_server.py @@ -395,7 +395,7 @@ class StatsApp: # Application UI plugins: /plugins/{id}/... if args and args[0] == "plugins": if len(args) < 2: - raise cherrypy.NotFound() + return self.index() plugin_id = args[1] return self._serve_plugin_ui(plugin_id, tuple(args[2:])) diff --git a/tests/test_http_server_unit.py b/tests/test_http_server_unit.py index 9887b6b..3895540 100644 --- a/tests/test_http_server_unit.py +++ b/tests/test_http_server_unit.py @@ -127,6 +127,7 @@ def test_stats_app_index_and_default_routing(monkeypatch, tmp_path): app.default("api") assert app.default("ws", "packets") == "" + assert app.default("plugins") == "ok" assert app.default("route") == "ok"