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.



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

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.



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

def response
  @response
end