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.
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
#response ⇒ Object
The Net::HTTPResponse that caused this error.
43 44 45 |
# File 'lib/gdata/client.rb', line 43 def response @response end |