<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,9 +1,11 @@
 class Twitter::Client
   alias :old_inspect :inspect
+
   def inspect
     s = old_inspect
     s.gsub!(/@password=&quot;.*?&quot;/, '@password=&quot;XXXX&quot;')
   end
+
   protected
     attr_accessor :login, :password
     
@@ -34,8 +36,10 @@ class Twitter::Client
     @@http_header = nil
     
     def raise_rest_error(response, uri = nil)
+      map = JSON.parse(response.body)
       raise Twitter::RESTError.new(:code =&gt; response.code, 
                                    :message =&gt; response.message,
+                                   :error =&gt; map[&quot;error&quot;],
                                    :uri =&gt; uri)        
     end
     
@@ -90,4 +94,3 @@ class Twitter::Client
     	Net::HTTP::Delete.new(path, http_header)
     end
 end
-</diff>
      <filename>lib/twitter/client/base.rb</filename>
    </modified>
    <modified>
      <diff>@@ -101,8 +101,8 @@ module Twitter
   #  /i_am_crap.json
   class RESTError &lt; RuntimeError 
     include ClassUtilMixin
-    @@ATTRIBUTES = [:code, :message, :uri]
-    attr_accessor :code, :message, :uri
+    @@ATTRIBUTES = [:code, :message, :uri, :error]
+    attr_accessor :code, :message, :uri, :error
     
     # Returns string in following format:
     #  &quot;HTTP #{@code}: #{@message} at #{@uri}&quot;</diff>
      <filename>lib/twitter/core.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2bd190bc5a9e4fe8674275209c9da77401efefc9</id>
    </parent>
  </parents>
  <author>
    <name>Susan Potter</name>
    <email>me@susanpotter.net</email>
  </author>
  <url>http://github.com/mbbx6spp/twitter4r/commit/db31430e7fe0222ddaecc81402ed4de23d13487f</url>
  <id>db31430e7fe0222ddaecc81402ed4de23d13487f</id>
  <committed-date>2009-06-06T14:32:46-07:00</committed-date>
  <authored-date>2009-06-06T14:30:20-07:00</authored-date>
  <message>Added error message returned back in JSON when error HTTP response sent back from twitter.com service</message>
  <tree>bb5cc6cafe322310e6032c28feec055fdf442453</tree>
  <committer>
    <name>Susan Potter</name>
    <email>me@susanpotter.net</email>
  </committer>
</commit>
