class Flickr::ApiError
This error is raised when there is an error in the request.
@see code
Attributes
code[R]
Flickr’s code of the error. The list possible errors and their codes is shown below every API method on {flickr.com/services/api}. For example:
- 100: There is no API key - 105: Service currently unavailable - ...
@example
begin Flickr.photos.get_recent rescue Flickr::ApiError => error puts "There is no API key" if error.code == 100 end
@return [Integer]
Public Class Methods
new(message = nil, code = nil)
click to toggle source
@private
Calls superclass method
# File lib/flickr/error.rb, line 41 def initialize(message = nil, code = nil) super(message) @code = code.to_i end
Public Instance Methods
message()
click to toggle source
# File lib/flickr/error.rb, line 46 def message "#{code}: #{super}" end