diff --git a/sanic/exceptions.py b/sanic/exceptions.py index 4f01d64e..e30c178c 100644 --- a/sanic/exceptions.py +++ b/sanic/exceptions.py @@ -70,7 +70,7 @@ TRACEBACK_WRAPPER_HTML = ''' {frame_html}

{exc_name}: {exc_value} - while handling uri {uri} + while handling path {path}

diff --git a/sanic/handlers.py b/sanic/handlers.py index d5a5d0dd..0b1ee89c 100644 --- a/sanic/handlers.py +++ b/sanic/handlers.py @@ -34,7 +34,7 @@ class ErrorHandler: exc_name=exc_type.__name__, exc_value=exc_value, frame_html=''.join(frame_html), - uri=request.url) + path=request.path) def add(self, exception, handler): self.handlers[exception] = handler diff --git a/sanic/testing.py b/sanic/testing.py index da22b34c..85ac5922 100644 --- a/sanic/testing.py +++ b/sanic/testing.py @@ -18,7 +18,8 @@ class TestClient: log.info(url) conn = aiohttp.TCPConnector(verify_ssl=False) - async with aiohttp.ClientSession(cookies=cookies, connector=conn) as session: + async with aiohttp.ClientSession( + cookies=cookies, connector=conn) as session: async with getattr( session, method.lower())(url, *args, **kwargs) as response: response.text = await response.text() diff --git a/tests/test_exceptions_handler.py b/tests/test_exceptions_handler.py index fac8ea85..aca3345d 100644 --- a/tests/test_exceptions_handler.py +++ b/tests/test_exceptions_handler.py @@ -75,7 +75,7 @@ def test_html_traceback_output_in_debug_mode(): summary_text = " ".join(soup.select('.summary')[0].text.split()) assert ( "NameError: name 'bar' " - "is not defined while handling uri /4") == summary_text + "is not defined while handling path /4") == summary_text def test_inherited_exception_handler():