@@ -58,15 +58,15 @@ def perform_request(self, method, url, params=None, body=None, timeout=None, ign
58
58
duration = self .loop .time () - start
59
59
60
60
except asyncio .TimeoutError as e :
61
- self .log_request_fail (method , url , body , self .loop .time () - start , exception = e )
61
+ self .log_request_fail (method , url , url_path , body , self .loop .time () - start , exception = e )
62
62
raise ConnectionTimeout ('TIMEOUT' , str (e ), e )
63
63
64
64
except FingerprintMismatch as e :
65
- self .log_request_fail (method , url , body , self .loop .time () - start , exception = e )
65
+ self .log_request_fail (method , url , url_path , body , self .loop .time () - start , exception = e )
66
66
raise SSLError ('N/A' , str (e ), e )
67
67
68
68
except ClientError as e :
69
- self .log_request_fail (method , url , body , self .loop .time () - start , exception = e )
69
+ self .log_request_fail (method , url , url_path , body , self .loop .time () - start , exception = e )
70
70
raise ConnectionError ('N/A' , str (e ), e )
71
71
72
72
finally :
@@ -75,7 +75,7 @@ def perform_request(self, method, url, params=None, body=None, timeout=None, ign
75
75
76
76
# raise errors based on http status codes, let the client handle those if needed
77
77
if not (200 <= response .status < 300 ) and response .status not in ignore :
78
- self .log_request_fail (method , url , body , duration , response .status , raw_data )
78
+ self .log_request_fail (method , url , url_path , body , duration , status_code = response .status , response = raw_data )
79
79
self ._raise_error (response .status , raw_data )
80
80
81
81
self .log_request_success (method , url , url_path , body , response .status , raw_data , duration )
0 commit comments