Skip to content

Instantly share code, notes, and snippets.

@henrik
Created October 27, 2023 11:26

Revisions

  1. henrik created this gist Oct 27, 2023.
    18 changes: 18 additions & 0 deletions app__lib__temporary_network_errors.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    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