Skip to content

Commit

Permalink
Remove Twitter::Error::EnhanceYourCalm
Browse files Browse the repository at this point in the history
The new Twitter Search API endpoint (api.twitter.com) never returns HTTP
status 420. Instead, it returns HTTP 400 (which throws a
Twitter::Error::BadRequest).
  • Loading branch information
sferik committed Jun 6, 2012
1 parent 6c01d7f commit fbcf8f1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 17 deletions.
13 changes: 0 additions & 13 deletions lib/twitter/error/enhance_your_calm.rb

This file was deleted.

3 changes: 0 additions & 3 deletions lib/twitter/response/raise_client_error.rb
@@ -1,6 +1,5 @@
require 'faraday'
require 'twitter/error/bad_request'
require 'twitter/error/enhance_your_calm'
require 'twitter/error/forbidden'
require 'twitter/error/not_acceptable'
require 'twitter/error/not_found'
Expand All @@ -22,8 +21,6 @@ def on_complete(env)
raise Twitter::Error::NotFound.new(error_body(env[:body]), env[:response_headers])
when 406
raise Twitter::Error::NotAcceptable.new(error_body(env[:body]), env[:response_headers])
when 420
raise Twitter::Error::EnhanceYourCalm.new(error_body(env[:body]), env[:response_headers])
end
end

Expand Down
1 change: 0 additions & 1 deletion spec/faraday/response_spec.rb
Expand Up @@ -11,7 +11,6 @@
403 => Twitter::Error::Forbidden,
404 => Twitter::Error::NotFound,
406 => Twitter::Error::NotAcceptable,
420 => Twitter::Error::EnhanceYourCalm,
500 => Twitter::Error::InternalServerError,
502 => Twitter::Error::BadGateway,
503 => Twitter::Error::ServiceUnavailable,
Expand Down

0 comments on commit fbcf8f1

Please sign in to comment.