Skip to content

Commit

Permalink
Fixed error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
HiroProt committed Oct 25, 2010
1 parent 0db7f95 commit cfdfbe1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sugestio.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def handle_errors(response)
when 500
raise ServerError, response_description
else
unless [200, 201, 202].include?(response.code)
unless [200, 201, 202].include?(response.code.to_i)
raise UnknownError, response_description
end
end
Expand Down

0 comments on commit cfdfbe1

Please sign in to comment.