Add traceback suppressions to commonly shown internals.
This commit is contained in:
parent
526115c3c5
commit
da9ff33fa7
|
@ -39,13 +39,13 @@ class Router(BaseRouter):
|
|||
extra={"host": host} if host else None,
|
||||
)
|
||||
except RoutingNotFound as e:
|
||||
raise NotFound("Requested URL {} not found".format(e.path))
|
||||
raise NotFound(f"Requested URL {e.path} not found") from None
|
||||
except NoMethod as e:
|
||||
raise MethodNotAllowed(
|
||||
"Method {} not allowed for URL {}".format(method, path),
|
||||
f"Method {method} not allowed for URL {path}",
|
||||
method=method,
|
||||
allowed_methods=e.allowed_methods,
|
||||
)
|
||||
) from None
|
||||
|
||||
@lru_cache(maxsize=ROUTER_CACHE_SIZE)
|
||||
def get( # type: ignore
|
||||
|
@ -61,6 +61,7 @@ class Router(BaseRouter):
|
|||
correct response
|
||||
:rtype: Tuple[ Route, RouteHandler, Dict[str, Any]]
|
||||
"""
|
||||
__tracebackhide__ = True
|
||||
return self._get(path, method, host)
|
||||
|
||||
def add( # type: ignore
|
||||
|
|
Loading…
Reference in New Issue
Block a user