MCPcopy Create free account
hub / github.com/encode/starlette / NoMatchFound

Class NoMatchFound

starlette/routing.py:30–38  ·  view source on GitHub ↗

Raised by `.url_for(name, **path_params)` and `.url_path_for(name, **path_params)` if no matching route exists.

Source from the content-addressed store, hash-verified

28
29
30class NoMatchFound(Exception):
31 """
32 Raised by `.url_for(name, **path_params)` and `.url_path_for(name, **path_params)`
33 if no matching route exists.
34 """
35
36 def __init__(self, name: str, path_params: dict[str, Any]) -> None:
37 params = ", ".join(list(path_params.keys()))
38 super().__init__(f'No route exists for name "{name}" and params "{params}".')
39
40
41class Match(Enum):

Callers 5

url_path_forMethod · 0.85
url_path_forMethod · 0.85
url_path_forMethod · 0.85
url_path_forMethod · 0.85
url_path_forMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected