diff --git a/sanic/testing.py b/sanic/testing.py index 09554e21..075185b7 100644 --- a/sanic/testing.py +++ b/sanic/testing.py @@ -32,7 +32,7 @@ class SanicTestClient: try: response.json = await response.json() - except (JSONDecodeError, UnicodeDecodeError): + except (JSONDecodeError, UnicodeDecodeError, aiohttp.ClientResponseError): response.json = None response.body = await response.read()