Sha256: 3c313f32c2885e17180ccf248dc35081777df45c7118c8c13faad109997b45a8

Contents?: true

Size: 575 Bytes

Versions: 73

Compression:

Stored size: 575 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

73 entries across 73 versions & 10 rubygems

Version Path
suspenders-1.54.1 templates/errors.rb
suspenders-1.54.0 templates/errors.rb
suspenders-1.53.0 templates/errors.rb
suspenders-1.52.0 templates/errors.rb
suspenders-1.51.0 templates/errors.rb
bulldozer-1.6.3 templates/errors.rb
bulldozer-1.6.2 templates/errors.rb
bulldozer-1.6.1 templates/errors.rb
bulldozer-1.6.0 templates/errors.rb
suspenders-1.50.0 templates/errors.rb
suspenders-1.49.0 templates/errors.rb
suspenders-1.48.0 templates/errors.rb
suspenders-1.47.0 templates/errors.rb
suspenders-1.46.0 templates/errors.rb
slining-1.7.0 templates/errors.rb
welaika-suspenders-2.28.0 templates/errors.rb
suspenders-1.45.0 templates/errors.rb
welaika-suspenders-2.27.0 templates/errors.rb
voyage-1.44.0.14 templates/errors.rb
welaika-suspenders-2.26.0 templates/errors.rb