From a0f4bf4bb60a95a959314f3540a42f186f1f8ace Mon Sep 17 00:00:00 2001 From: TheGreatAlgo <37487508+TheGreatAlgo@users.noreply.github.com> Date: Fri, 7 Jul 2023 23:29:13 +0200 Subject: [PATCH] fix: improve error message --- src/werkzeug/routing/rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/werkzeug/routing/rules.py b/src/werkzeug/routing/rules.py index 63e62c941..d65dce028 100644 --- a/src/werkzeug/routing/rules.py +++ b/src/werkzeug/routing/rules.py @@ -454,7 +454,7 @@ def __init__( websocket: bool = False, ) -> None: if not string.startswith("/"): - raise ValueError("urls must start with a leading slash") + raise ValueError("urls must start with a leading slash:", string) self.rule = string self.is_leaf = not string.endswith("/") self.is_branch = string.endswith("/")