only record response if there is one
there _usually_ is a response,
but in some error cases (e.g. connection error) it could be None.
In which case, there's nothing to record.
@@ -82,6 +82,7 @@ class MockAsyncHTTPClient(CurlAsyncHTTPClient):
error = e
response = e.response
+ if response:
self._record_response(url_key, response)
# return or raise the original result
if error:
