Better testing error messages on protocol errors.
This commit is contained in:
parent
6d8f5988d3
commit
b2476bd7d7
|
@ -40,6 +40,9 @@ class SanicTestClient:
|
||||||
response = await getattr(session, method.lower())(
|
response = await getattr(session, method.lower())(
|
||||||
url, verify=False, *args, **kwargs
|
url, verify=False, *args, **kwargs
|
||||||
)
|
)
|
||||||
|
except httpx.exceptions.ConnectionClosed:
|
||||||
|
logger.error(f"{method.upper()} {url} broken HTTP, response is None!")
|
||||||
|
return None
|
||||||
except NameError:
|
except NameError:
|
||||||
raise Exception(response.status_code)
|
raise Exception(response.status_code)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user