プロジェクト

全般

プロフィール

環境対応 #536 » a.patch

Satoshi Okuno, 2012-11-23 10:39

差分を表示:

connect.rb (作業コピー)
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
    (1-1/1)