Sha256: 308904c73f29d8f4c8549e45f54490cef19ce45cb33ba3b65b809657c054bf87

Contents?: true

Size: 864 Bytes

Versions: 6

Compression:

Stored size: 864 Bytes

Contents

# frozen_string_literal: true

require_relative 'attachment'
require_relative 'client'

module Mailtrap
  class AttachmentContentError < StandardError; end

  class Error < StandardError
    attr_reader :messages

    def initialize(messages)
      @messages = messages

      super(messages.join(', '))
    end
  end

  # AuthorizationError is raised when invalid token is used.
  class AuthorizationError < Error; end

  # MailSizeError is raised when mail is too large.
  class MailSizeError < Error; end

  # RateLimitError is raised when client performing too many requests.
  class RateLimitError < Error; end

  # RejectionError is raised when server refuses to process the request. Use
  # error message to debug the problem.
  #
  # *Some* possible reasons:
  #   * Account is banned
  #   * Domain is not verified
  class RejectionError < Error; end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mailtrap-2.3.0 lib/mailtrap/errors.rb
mailtrap-2.2.0 lib/mailtrap/errors.rb
mailtrap-2.1.2 lib/mailtrap/errors.rb
mailtrap-2.1.1 lib/mailtrap/errors.rb
mailtrap-2.1.0 lib/mailtrap/errors.rb
mailtrap-2.0.0 lib/mailtrap/errors.rb