Sha256: 5c6aac3ba4d15280073cd21911343d043442cdcf7caada087d7b55dad72333f9

Contents?: true

Size: 623 Bytes

Versions: 44

Compression:

Stored size: 623 Bytes

Contents

# frozen_string_literal: true
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
].freeze

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

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

SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
onotole-2.0.2 templates/errors.rb
onotole-2.0.1 templates/errors.rb
onotole-2.0.0 templates/errors.rb
onotole-1.2.11 templates/errors.rb
onotole-1.2.10 templates/errors.rb
onotole-1.2.9 templates/errors.rb
onotole-1.2.8 templates/errors.rb
onotole-1.2.7 templates/errors.rb
onotole-1.2.6 templates/errors.rb
onotole-1.2.5 templates/errors.rb
onotole-1.2.4 templates/errors.rb
onotole-1.2.3 templates/errors.rb
onotole-1.2.2 templates/errors.rb
onotole-1.2.1 templates/errors.rb
onotole-1.1.21 templates/errors.rb
onotole-1.1.20 templates/errors.rb
onotole-1.1.19 templates/errors.rb
onotole-1.1.18 templates/errors.rb
onotole-1.1.17 templates/errors.rb
onotole-1.1.16 templates/errors.rb