Use actual timeout value in error message
This commit is contained in:
parent
31c7b383b4
commit
97bb03c725
@ -226,7 +226,8 @@ class HttpClient:
|
|||||||
error_str = str(error).lower()
|
error_str = str(error).lower()
|
||||||
|
|
||||||
if "timeout" in error_str:
|
if "timeout" in error_str:
|
||||||
return "Request timeout (30 seconds)"
|
timeout_seconds = self.session.get_timeout()
|
||||||
|
return f"Request timeout ({timeout_seconds} seconds)"
|
||||||
elif "resolve" in error_str:
|
elif "resolve" in error_str:
|
||||||
return f"Could not resolve hostname: {error}"
|
return f"Could not resolve hostname: {error}"
|
||||||
elif "connect" in error_str:
|
elif "connect" in error_str:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user