lib/twitter_auth/dispatcher/shared.rb in mbleigh-twitter-auth-0.1.14 vs lib/twitter_auth/dispatcher/shared.rb in mbleigh-twitter-auth-0.1.15
- old
+ new
@@ -14,10 +14,10 @@
JSON.parse(response.body)
rescue JSON::ParserError
response.body
end
when Net::HTTPUnauthorized
- raise TwitterAuth::Dispatcher::Error, 'The credentials provided did not authorize the user.'
+ raise TwitterAuth::Dispatcher::Unauthorized, 'The credentials provided did not authorize the user.'
else
message = begin
JSON.parse(response.body)['error']
rescue JSON::ParserError
if match = response.body.match(/<error>(.*)<\/error>/)