deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [2/4] git commit: Vsphere: Return 400 in case that required parameter is missing
Date Wed, 02 Jan 2013 14:41:10 GMT
Vsphere: Return 400 in case that required parameter is missing

I discover this by creating an instance without name. The error
was reported as 500 (Backend error), but it should be 400 (Bad request).


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

Branch: refs/heads/master
Commit: f289668327a365aaca1284df14b3b32cc519ba9d
Parents: 8786328
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Jan 2 14:56:45 2013 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Wed Jan 2 14:56:45 2013 +0100

----------------------------------------------------------------------
 .../deltacloud/drivers/vsphere/vsphere_driver.rb   |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/f2896683/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb b/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
index 4f9df5f..5bc7088 100644
--- a/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
+++ b/server/lib/deltacloud/drivers/vsphere/vsphere_driver.rb
@@ -380,6 +380,10 @@ module Deltacloud::Drivers::Vsphere
         status 504
       end
 
+      on /missing required parameter name/ do
+        status 400
+      end
+
       on /Invalid/ do
         status 400
       end


Mime
View raw message