Created
October 27, 2023 11:26
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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