Exception: S3Search::RequestError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/s3search/request_error.rb

Direct Known Subclasses

NotFound, Unauthorized

Defined Under Namespace

Classes: NotFound, Unauthorized

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ RequestError

Returns a new instance of RequestError.



5
6
7
8
9
10
# File 'lib/s3search/request_error.rb', line 5

def initialize(response)
  @response = response
  msg = "Error processing request: (#{response.status})! #{response.env[:method]} URL: #{response.env[:url]}"
  msg << "\n Resp Body: #{response.body}"
  super msg
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



3
4
5
# File 'lib/s3search/request_error.rb', line 3

def response
  @response
end