Exception: GData::Client::RequestError
- Defined in:
- lib/gdata/client.rb
Overview
Base class for errors raised due to requests
Direct Known Subclasses
AuthorizationError, BadRequestError, ServerError, UnknownError, VersionConflictError
Instance Attribute Summary collapse
-
#response ⇒ Object
The Net::HTTPResponse that caused this error.
Instance Method Summary collapse
-
#initialize(response) ⇒ RequestError
constructor
Creates a new RequestError from Net::HTTPResponse
response
with a message containing the error code and response body.
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
#response ⇒ Object
The Net::HTTPResponse that caused this error.
45 46 47 |
# File 'lib/gdata/client.rb', line 45 def response @response end |