Skip to content

Instantly share code, notes, and snippets.

@henrik
Created October 27, 2023 11:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save henrik/eb6ae964349b6ea4e2e5fa04d7f734e6 to your computer and use it in GitHub Desktop.
Save henrik/eb6ae964349b6ea4e2e5fa04d7f734e6 to your computer and use it in GitHub Desktop.
Ruby `TemporaryNetworkErrors.all` – sloppier superset of https://github.com/barsoom/net_http_timeout_errors.
require "net/ssh/proxy/errors"
module TemporaryNetworkErrors
def self.all
[
*NetHttpTimeoutErrors.all,
Errno::EBADF,
IOError,
OpenSSL::SSL::SSLError,
Faraday::TimeoutError,
# These are for some SFTP integrations.
Net::SSH::Proxy::ConnectError,
Net::SSH::Disconnect,
]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment