Sha256: 458c3a1bc663dfa4f840f7dd5cabeeaad1ad0cffe93c41b9c84d113e5e8f9853

Contents?: true

Size: 2 KB

Versions: 6

Compression:

Stored size: 2 KB

Contents

require "securerandom"
require "double_bag_ftps"
require "net/sftp"
require "net/ftp"
require 'streamio-ffmpeg'

module RestFtpDaemon
  class Job

    # Common errors
    ERRORS = {
      invalid_argument:         Errno::EINVAL,

      source_not_supported:     RestFtpDaemon::SourceNotSupported,
      source_not_found:         RestFtpDaemon::SourceNotFound,
      target_file_exists:       RestFtpDaemon::TargetFileExists,
      target_directory_error:   RestFtpDaemon::TargetDirectoryError,
      target_permission_error:  RestFtpDaemon::TargetPermissionError,
      target_not_supported:     RestFtpDaemon::TargetNotSupported,
      assertion_failed:         RestFtpDaemon::AssertionFailed,
      location_parse_error:     RestFtpDaemon::LocationParseError,

      conn_socket_error:        SocketError,
      conn_eof:                 EOFError,
      conn_failed:              Errno::ENOTCONN,
      conn_host_is_down:        Errno::EHOSTDOWN,
      conn_broken_pipe:         Errno::EPIPE,
      conn_unreachable:         Errno::ENETUNREACH,
      conn_reset_by_peer:       Errno::ECONNRESET,
      conn_refused:             Errno::ECONNREFUSED,
      conn_timed_out_1:         Timeout::Error,
      conn_timed_out_2:         Net::ReadTimeout,
      conn_timed_out_3:         Errno::ETIMEDOUT,

      ftp_connection_error:     Net::FTPConnectionError,
      ftp_perm_error:           Net::FTPPermError,
      ftp_reply_error:          Net::FTPReplyError,
      ftp_temp_error:           Net::FTPTempError,
      ftp_proto_error:          Net::FTPProtoError,
      ftp_error:                Net::FTPError,

      ffmpeg_error:             FFMPEG::Error,

      sftp_exception:           Net::SFTP::StatusException,
      sftp_key_mismatch:        Net::SSH::HostKeyMismatch,
      sftp_auth_failed:         Net::SSH::AuthenticationFailed,
      sftp_openssl_error:       OpenSSL::SSL::SSLError,
      # rescue Encoding::UndefinedConversionError => exception
      #   return oops :ended, exception, "encoding_error", true
      }

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rest-ftp-daemon-0.423.2 lib/rest-ftp-daemon/jobs/errors.rb
rest-ftp-daemon-0.423.1 lib/rest-ftp-daemon/jobs/errors.rb
rest-ftp-daemon-0.423.0 lib/rest-ftp-daemon/jobs/errors.rb
rest-ftp-daemon-0.422.0 lib/rest-ftp-daemon/jobs/errors.rb
rest-ftp-daemon-0.421.1 lib/rest-ftp-daemon/jobs/errors.rb
rest-ftp-daemon-0.421.0 lib/rest-ftp-daemon/jobs/errors.rb