diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-25 21:22:36 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-25 21:22:36 +0300 |
| commit | c315cc0d9a89984ea43a6f7f59f0e5cd9560e7c9 (patch) | |
| tree | 0e75a5adf37a0f147c5b8f2c58f64268e45ab3ba /lib/hyperstack/client.rb | |
| parent | ee67020aa88063eccc26ce2030111d365f8cf6c2 (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.
Diffstat (limited to 'lib/hyperstack/client.rb')
| -rw-r--r-- | lib/hyperstack/client.rb | 2 |
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 |
