summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-25 21:22:36 +0300
committerPaul Buetow <paul@buetow.org>2026-05-25 21:22:36 +0300
commitc315cc0d9a89984ea43a6f7f59f0e5cd9560e7c9 (patch)
tree0e75a5adf37a0f147c5b8f2c58f64268e45ab3ba
parentee67020aa88063eccc26ce2030111d365f8cf6c2 (diff)
fix(client): explicitly rescue Net::ReadTimeout alongside Net::OpenTimeout
Net::ReadTimeout inherits from Timeout::Error and was already caught indirectly, but listing it explicitly matches the pattern used in Config and InferenceTester and guards against future Ruby changes. Also makes the retry intent obvious for anyone auditing the rescue clause.
-rw-r--r--lib/hyperstack/client.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/hyperstack/client.rb b/lib/hyperstack/client.rb
index b7b4a6b..bb67318 100644
--- a/lib/hyperstack/client.rb
+++ b/lib/hyperstack/client.rb
@@ -112,7 +112,7 @@ module HyperstackVM
parse_response(response)
rescue Timeout::Error, Errno::ECONNREFUSED, Errno::ECONNRESET,
Errno::EHOSTUNREACH, Errno::ENETUNREACH,
- SocketError, OpenSSL::SSL::SSLError, Net::OpenTimeout => e
+ SocketError, OpenSSL::SSL::SSLError, Net::OpenTimeout, Net::ReadTimeout => e
raise Error, "Hyperstack API request failed for #{path}: #{e.message}" if retries_left <= 0
retries_left -= 1