File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ Unreleased
1111- ``_plain_int `` and ``_plain_float `` strip whitespace before type
1212 enforcement. :issue: `2734 `
1313- Fix empty file streaming when testing. :issue: `2740 `
14+ - Clearer error message when URL rule does not start with slash. :pr: `2750 `
1415
1516
1617Version 2.3.6
Original file line number Diff line number Diff line change @@ -454,7 +454,8 @@ def __init__(
454454 websocket : bool = False ,
455455 ) -> None :
456456 if not string .startswith ("/" ):
457- raise ValueError ("urls must start with a leading slash" )
457+ raise ValueError (f"URL rule '{ string } ' must start with a slash." )
458+
458459 self .rule = string
459460 self .is_leaf = not string .endswith ("/" )
460461 self .is_branch = string .endswith ("/" )
You can’t perform that action at this time.
0 commit comments