Permalink
Browse files

Move RequestTimeout rescue before RequestFailed

Since RequestTimeout is a subclass of RequestFailed, we'd never see the
specialized error message printed by rescuing a RequestTimeout.
  • Loading branch information...
1 parent faf290c commit 67f84412d8e0da1fe59bb68f25be4f4a98c35d2a @brandur brandur committed Apr 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/heroku/command.rb
@@ -164,10 +164,10 @@ def self.run(cmd, arguments=[])
arguments << '--confirm' << app
retry
end
- rescue RestClient::RequestFailed => e
- error extract_error(e.http_body)
rescue RestClient::RequestTimeout
error "API request timed out. Please try again, or contact support@heroku.com if this issue persists."
+ rescue RestClient::RequestFailed => e
+ error extract_error(e.http_body)
rescue CommandFailed => e
error e.message
rescue OptionParser::ParseError => ex

0 comments on commit 67f8441

Please sign in to comment.