環境対応 #536 » a.patch
| 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
|
||