Sha256: bc364ee8b2199b091bf68927c6da9a67a31533014af4cfdae406451a247b5d89

Contents?: true

Size: 1.01 KB

Versions: 29

Compression:

Stored size: 1.01 KB

Contents

module HTTParty
  # @abstact Exceptions raised by HTTParty inherit from Error
  class Error < StandardError; end

  # Exception raised when you attempt to set a non-existant format
  class UnsupportedFormat < Error; end

  # Exception raised when using a URI scheme other than HTTP or HTTPS
  class UnsupportedURIScheme < Error; end

  # @abstract Exceptions which inherit from ResponseError contain the Net::HTTP
  # response object accessible via the {#response} method.
  class ResponseError < Error
    # Returns the response of the last request
    # @return [Net::HTTPResponse] A subclass of Net::HTTPResponse, e.g.
    # Net::HTTPOK
    attr_reader :response

    # Instantiate an instance of ResponseError with a Net::HTTPResponse object
    # @param [Net::HTTPResponse]
    def initialize(response)
      @response = response
    end
  end

  # Exception that is raised when request has redirected too many times.
  # Calling {#response} returns the Net:HTTP response object.
  class RedirectionTooDeep < ResponseError; end
end

Version data entries

29 entries across 27 versions & 9 rubygems

Version Path
alloy_sdk-0.1.0 vendor/bundle/ruby/3.0.0/gems/httparty-0.13.1/lib/httparty/exceptions.rb
alloy_sdk-0.1.0 vendor/bundle/ruby/2.6.0/gems/httparty-0.13.1/lib/httparty/exceptions.rb
simplenet-client-0.2.0 ./vendor/bundle/ruby/2.0.0/gems/httparty-0.13.7/lib/httparty/exceptions.rb
simplenet-client-0.2.0 ./vendor/bundle/ruby/1.9.1/gems/httparty-0.13.7/lib/httparty/exceptions.rb
httparty-0.13.7 lib/httparty/exceptions.rb
httparty-0.13.6 lib/httparty/exceptions.rb
httpserious-0.13.5.lstoll1 lib/httparty/exceptions.rb
httparty-0.13.5 lib/httparty/exceptions.rb
httparty-0.13.4 lib/httparty/exceptions.rb
httsoiree-0.13.3 lib/httparty/exceptions.rb
allegro_api_client-0.0.9 gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/exceptions.rb
httparty-0.13.3 lib/httparty/exceptions.rb
allegro_api_client-0.0.8 gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/exceptions.rb
allegro_api_client-0.0.7 gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/exceptions.rb
httparty-0.13.2 lib/httparty/exceptions.rb
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/httparty-0.13.1/lib/httparty/exceptions.rb
allegro_api_client-0.0.6 gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/exceptions.rb
allegro_api_client-0.0.5 gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/exceptions.rb
allegro_api_client-0.0.4 gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/exceptions.rb
allegro_api_client-0.0.3 gems/ruby/2.1.0/gems/httparty-0.13.1/lib/httparty/exceptions.rb