Exception: Dropbox::APIError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/dropbox/api.rb

Overview

Superclass for exceptions raised when the server reports an error.

Direct Known Subclasses

ParseError, UnsuccessfulResponseError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request, response) ⇒ APIError

:nodoc:



508
509
510
511
# File 'lib/dropbox/api.rb', line 508

def initialize(request, response) # :nodoc:
  @request = request
  @response = response
end

Instance Attribute Details

#requestObject (readonly)

The request URL.



504
505
506
# File 'lib/dropbox/api.rb', line 504

def request
  @request
end

#responseObject (readonly)

The Net::HTTPResponse returned by the server.



506
507
508
# File 'lib/dropbox/api.rb', line 506

def response
  @response
end

Instance Method Details

#to_sObject

:nodoc:



513
514
515
# File 'lib/dropbox/api.rb', line 513

def to_s # :nodoc:
  "API error: #{request}"
end