Use actual timeout value in error message

This commit is contained in:
vesp 2026-01-05 11:18:32 +01:00
parent 1c124939b6
commit 758e639f9e

View File

@ -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: