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.



49
50
51
52
53
# File 'lib/gdata/client.rb', line 49

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.



45
46
47
# File 'lib/gdata/client.rb', line 45

def response
  @response
end