airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject svn commit: r1415662 - /airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java
Date Fri, 30 Nov 2012 14:48:59 GMT
Author: chathuri
Date: Fri Nov 30 14:48:58 2012
New Revision: 1415662

URL: http://svn.apache.org/viewvc?rev=1415662&view=rev
Log:
fixing hosts not saving

Modified:
    airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java

Modified: airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java?rev=1415662&r1=1415661&r2=1415662&view=diff
==============================================================================
--- airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java
(original)
+++ airavata/trunk/modules/rest/client/src/main/java/org/apache/airavata/rest/client/DescriptorResourceClient.java
Fri Nov 30 14:48:58 2012
@@ -185,10 +185,12 @@ public class DescriptorResourceClient {
 
             status = response.getStatus();
 
-            if (status != ClientConstant.HTTP_OK) {
+            if (status != ClientConstant.HTTP_OK && status != ClientConstant.HTTP_BAD_REQUEST)
{
                 logger.error(response.getEntity(String.class));
                 throw new RuntimeException("Failed : HTTP error code : "
                         + status);
+            } else if (status == ClientConstant.HTTP_BAD_REQUEST){
+                return null;
             }
         }
 
@@ -633,10 +635,12 @@ public class DescriptorResourceClient {
 
             status = response.getStatus();
 
-            if (status != ClientConstant.HTTP_OK) {
+            if (status != ClientConstant.HTTP_OK && status != ClientConstant.HTTP_BAD_REQUEST)
{
                 logger.error(response.getEntity(String.class));
                 throw new RuntimeException("Failed : HTTP error code : "
                         + status);
+            } else if (status == ClientConstant.HTTP_BAD_REQUEST){
+                return null;
             }
         }
 



Mime
View raw message