lib/twitter_auth/dispatcher/shared.rb in mbleigh-twitter-auth-0.1.13 vs lib/twitter_auth/dispatcher/shared.rb in mbleigh-twitter-auth-0.1.14

- old
+ new

@@ -13,9 +13,11 @@ begin 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.' else message = begin JSON.parse(response.body)['error'] rescue JSON::ParserError if match = response.body.match(/<error>(.*)<\/error>/)