Skip to content

Commit

Permalink
add RequestEntityTooLarge error
Browse files Browse the repository at this point in the history
  • Loading branch information
tak1n committed Jun 29, 2016
1 parent 60eb256 commit 1078403
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/twitter/error.rb
Expand Up @@ -20,6 +20,9 @@ class Error < StandardError
# Raised when Twitter returns the HTTP status code 403
Forbidden = Class.new(ClientError)

# Raised when Twitter returns the HTTP status code 413
RequestEntityTooLarge = Class.new(ClientError)

# Raised when a Tweet has already been favorited
AlreadyFavorited = Class.new(Forbidden)

Expand Down Expand Up @@ -62,6 +65,7 @@ class Error < StandardError
403 => Twitter::Error::Forbidden,
404 => Twitter::Error::NotFound,
406 => Twitter::Error::NotAcceptable,
413 => Twitter::Error::RequestEntityTooLarge,
422 => Twitter::Error::UnprocessableEntity,
429 => Twitter::Error::TooManyRequests,
500 => Twitter::Error::InternalServerError,
Expand Down

0 comments on commit 1078403

Please sign in to comment.