Index: connect.rb
===================================================================
--- connect.rb	(リビジョン 1057)
+++ connect.rb	(作業コピー)
@@ -53,6 +53,21 @@
       case res.code
       when '200'
       when '400'
+        if res.is_a? Net::HTTPBadRequest
+          begin
+            error_message = (JSON.parse(res.body)["errors"][0]["message"] rescue nil)
+
+            if error_message == "Bad Authentication data"
+              atoken = authentication_failed_action(method, url, options, res)
+              notice atoken
+              return query_with_oauth!(method, url, options) if atoken
+            end
+
+            notice error_message
+          rescue JSON::ParserError
+          end
+        end
+
         fire_oauth_limit_event
       when '401'
         begin
