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
11
11
- ``_plain_int `` and ``_plain_float `` strip whitespace before type
12
12
enforcement. :issue: `2734 `
13
13
- Fix empty file streaming when testing. :issue: `2740 `
14
+ - Clearer error message when URL rule does not start with slash. :pr: `2750 `
14
15
15
16
16
17
Version 2.3.6
Original file line number Diff line number Diff line change @@ -454,7 +454,8 @@ def __init__(
454
454
websocket : bool = False ,
455
455
) -> None :
456
456
if not string .startswith ("/" ):
457
- raise ValueError ("urls must start with a leading slash:" , string )
457
+ raise ValueError (f"URL rule '{ string } ' must start with a slash." )
458
+
458
459
self .rule = string
459
460
self .is_leaf = not string .endswith ("/" )
460
461
self .is_branch = string .endswith ("/" )
You can’t perform that action at this time.
0 commit comments