Sha256: 1d4f32d3072412a1d470258783f7cb37f4cc3ff67bf4f63b9d4b57e60278f3ed

Contents?: true

Size: 572 Bytes

Versions: 11

Compression:

Stored size: 572 Bytes

Contents

require "net/http"
require "net/smtp"

# Example:
#   begin
#     some http call
#   rescue *HTTP_ERRORS => error
#     notify_hoptoad error
#   end

HTTP_ERRORS = [
  EOFError,
  Errno::ECONNRESET,
  Errno::EINVAL,
  Net::HTTPBadResponse,
  Net::HTTPHeaderSyntaxError,
  Net::ProtocolError,
  Timeout::Error
]

SMTP_SERVER_ERRORS = [
  IOError,
  Net::SMTPAuthenticationError,
  Net::SMTPServerBusy,
  Net::SMTPUnknownError,
  Timeout::Error
]

SMTP_CLIENT_ERRORS = [
  Net::SMTPFatalError,
  Net::SMTPSyntaxError
]

SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS

Version data entries

11 entries across 11 versions & 3 rubygems

Version Path
suspenders-1.55.1 templates/errors.rb
suspenders-1.55.0 templates/errors.rb
philosophies-suspenders-2.2.6 templates/errors.rb
philosophies-suspenders-2.2.4 templates/errors.rb
philosophies-suspenders-2.2.3 templates/errors.rb
philosophies-suspenders-2.2.2 templates/errors.rb
anadea-spark-0.5.0 templates/config/initializers/errors.rb
philosophies-suspenders-2.2.1 templates/errors.rb
philosophies-suspenders-2.2.0 templates/errors.rb
philosophies-suspenders-2.1.2 templates/errors.rb
philosophies-suspenders-2.1.1 templates/errors.rb