deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject git commit: Client: Added core 504 to list of catched error codes
Date Tue, 07 Feb 2012 13:51:38 GMT
Updated Branches:
  refs/heads/master 3f9fa7593 -> c212ad545


Client: Added core 504 to list of catched error codes


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/c212ad54
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/c212ad54
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/c212ad54

Branch: refs/heads/master
Commit: c212ad5454f40fd9e90698b61b5a75de0286c927
Parents: 3f9fa75
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Tue Feb 7 14:52:37 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue Feb 7 14:52:37 2012 +0100

----------------------------------------------------------------------
 client/lib/deltacloud.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/c212ad54/client/lib/deltacloud.rb
----------------------------------------------------------------------
diff --git a/client/lib/deltacloud.rb b/client/lib/deltacloud.rb
index 81b7d3b..614eab2 100644
--- a/client/lib/deltacloud.rb
+++ b/client/lib/deltacloud.rb
@@ -367,7 +367,7 @@ module DeltaCloud
       if conf[:method].eql?(:post)
         resource = RestClient::Resource.new(conf[:path], :open_timeout => conf[:open_timeout],
:timeout => conf[:timeout])
         resource.send(:post, conf[:form_data], default_headers.merge(extended_headers)) do
|response, request, block|
-          handle_backend_error(response) if [500, 502, 501, 401].include? response.code
+          handle_backend_error(response) if [500, 502, 501, 401, 504].include? response.code
           if response.respond_to?('body')
             yield response.body if block_given?
           else
@@ -377,7 +377,7 @@ module DeltaCloud
       else
         resource = RestClient::Resource.new(conf[:path], :open_timeout => conf[:open_timeout],
:timeout => conf[:timeout])
         resource.send(conf[:method], default_headers.merge(extended_headers)) do |response,
request, block|
-          handle_backend_error(response) if [500, 502, 501, 401].include? response.code
+          handle_backend_error(response) if [500, 502, 501, 504, 401].include? response.code
           if conf[:method].eql?(:get) and [301, 302, 307].include? response.code
             response.follow_redirection(request) do |response, request, block|
               if response.respond_to?('body')


Mime
View raw message