Sha256: 00ccc6ce7b47a79b409c7e2f8a56a1c917e1860dd001693d94671c2eef183f67

Contents?: true

Size: 732 Bytes

Versions: 30

Compression:

Stored size: 732 Bytes

Contents

module Parliament
  # An error raised when a 4xx status code is returned by Net::HTTP inside of Parliament::Request.
  #
  # @see Parliament::ServerError
  #
  # @since 0.6.0
  class ClientError < Parliament::NetworkError
    # @param [String] url the url that caused the Parliament::ClientError
    # @param [Net::HTTPClientError] response the Net:HTTPClientError that caused the Parliament::ClientError
    #
    # @example Creating a Parliament::ClientError
    #   url = 'http://localhost:3030/foo/bar'
    #
    #   response = Net::HTTP.get_response(URI(url))
    #
    #   raise Parliament::ClientError.new(url, response) if response.is_a?(Net::HTTPClientError)
    def initialize(url, response)
      super
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
parliament-ruby-1.0.2 lib/parliament/client_error.rb
parliament-ruby-1.0.1 lib/parliament/client_error.rb
parliament-ruby-1.0.0 lib/parliament/client_error.rb
parliament-ruby-1.0.0.pre6 lib/parliament/client_error.rb
parliament-ruby-1.0.0.pre5 lib/parliament/client_error.rb
parliament-ruby-1.0.0.pre4 lib/parliament/client_error.rb
parliament-ruby-1.0.0.pre3 lib/parliament/client_error.rb
parliament-ruby-1.0.0.pre2 lib/parliament/client_error.rb
parliament-ruby-1.0.0.pre lib/parliament/client_error.rb
parliament-ruby-0.10.2 lib/parliament/client_error.rb
parliament-ruby-0.10.1 lib/parliament/client_error.rb
parliament-ruby-0.10.0 lib/parliament/client_error.rb
parliament-ruby-0.9.0 lib/parliament/client_error.rb
parliament-ruby-0.8.0 lib/parliament/client_error.rb
parliament-ruby-0.7.9.pre2 lib/parliament/client_error.rb
parliament-ruby-0.7.9.pre lib/parliament/client_error.rb
parliament-ruby-0.7.8 lib/parliament/client_error.rb
parliament-ruby-0.7.8.pre lib/parliament/client_error.rb
parliament-ruby-0.7.7 lib/parliament/client_error.rb
parliament-ruby-0.7.6 lib/parliament/client_error.rb