Permalink
Browse files

Simplify error handling so we catch every bad response

  • Loading branch information...
1 parent aed83d8 commit e4a6ddc16f5f74ada1c723fa18d7725f4d6b0716 @mattwynne mattwynne committed Oct 13, 2010
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/relish/commands/push.rb
@@ -20,10 +20,7 @@ def post(tar_gz_data)
resource = RestClient::Resource.new(url)
resource.post(tar_gz_data, :content_type => 'application/x-gzip')
puts "sent:\n#{files.join("\n")}"
- rescue RestClient::ResourceNotFound,
- RestClient::Unauthorized,
- RestClient::BadRequest => exception
-
+ rescue RestClient::Exception => exception
warn exception.response
exit 1
end

0 comments on commit e4a6ddc

Please sign in to comment.