Sha256: 2c163dc172b734bc0fa47fe30ead562764e9c601e9bddf0a9e5ab7f2d9a7321c

Contents?: true

Size: 586 Bytes

Versions: 1

Compression:

Stored size: 586 Bytes

Contents

module Pepipost
  class APIException < StandardError
    # value store
    attr_reader :response_code

    # value store
    attr_reader :response_body

    # The HTTP response code from the API request
    # @param [String] the reason for raising an exception
    # @param [Numeric] the HTTP response code from the API request
    # @param [Object] the HTTP unprased response from the API request
    def initialize(reason, response_code, response_body)
      super(reason)
      @response_code = response_code
      @response_body = response_body
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pepipost-0.0.1 lib/pepipost/api_exception.rb