Exception: GData::Client::RequestError

Inherits:
Error
  • Object
show all
Defined in:
lib/gdata/client.rb

Overview

Base class for errors raised due to requests

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ RequestError

Creates a new RequestError from Net::HTTPResponse response with a message containing the error code and response body.



47
48
49
50
51
# File 'lib/gdata/client.rb', line 47

def initialize(response)
  @response = response

  super "request error #{response.status_code}: #{response.body}"
end

Instance Attribute Details

#responseObject

The Net::HTTPResponse that caused this error.



43
44
45
# File 'lib/gdata/client.rb', line 43

def response
  @response
end