From: Michal Fojtik <mfoj...@redhat.com> * When the API library code capture ArgumentError when calling a method on backend, it retries the same method but without credentials. However ArgumentError often indicate regular error in method arguments.
Signed-off-by: Michal fojtik <mfoj...@redhat.com> --- server/lib/deltacloud/api.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/lib/deltacloud/api.rb b/server/lib/deltacloud/api.rb index 9567023..4007572 100644 --- a/server/lib/deltacloud/api.rb +++ b/server/lib/deltacloud/api.rb @@ -117,7 +117,8 @@ module Deltacloud begin params = ([@credentials] + args).flatten backend.send(name, *params) - rescue ArgumentError + rescue ArgumentError => e + puts "[W] Wrong arguments for #{name}. Omitting credentials injection. (#{e.message})" backend.send(name, *args) end end -- 1.7.10.2