Class Twitter::RESTError
In: lib/twitter/core.rb
Parent: RuntimeError

Exception API base class raised when there is an error encountered upon querying or posting to the remote Twitter REST API.

To consume and query any RESTError raised by Twitter4R:

 begin
   # Do something with your instance of <tt>Twitter::Client</tt>.
   # Maybe something like:
   timeline = twitter.timeline_for(:public)
 rescue RESTError => re
   puts re.code, re.message, re.uri
 end

Which on the code raising a RESTError will output something like:

 404
 Resource Not Found
 /i_am_crap.json

Methods

register   registry   to_s  

Included Modules

ClassUtilMixin

Attributes

code  [RW] 
error  [RW] 
message  [RW] 
uri  [RW] 

Public Class methods

Public Instance methods

Returns string in following format:

 "HTTP #{@code}: #{@message} at #{@uri}"

For example,

 "HTTP 404: Resource Not Found at /i_am_crap.json
    >This is the error message sent back by the Twitter.com API"

[Validate]