You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2015/04/29 14:13:19 UTC

stratos git commit: Add a meaningful message to autoscaling policy deletion error

Repository: stratos
Updated Branches:
  refs/heads/master 327e1c37c -> 7d0a9d1d9


Add a meaningful message to autoscaling policy deletion error


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

Branch: refs/heads/master
Commit: 7d0a9d1d987c54b7f59c31d49fbaea062ff29fb0
Parents: 327e1c3
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Wed Apr 29 17:42:59 2015 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Wed Apr 29 17:42:59 2015 +0530

----------------------------------------------------------------------
 .../java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/7d0a9d1d/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
index 1356187..88e48fd 100644
--- a/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
+++ b/components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
@@ -1277,7 +1277,7 @@ public class StratosApiV41 extends AbstractApi {
             StratosApiV41Utils.removeAutoscalingPolicy(autoscalingPolicyId);
         } catch (AutoscalerServiceUnremovablePolicyExceptionException e) {
             return Response.status(Response.Status.BAD_REQUEST).entity(new ErrorResponseBean(
-                    Response.Status.NOT_ACCEPTABLE.getStatusCode(), e.getMessage())).build();
+                    Response.Status.NOT_ACCEPTABLE.getStatusCode(), "Autoscaling policy is in use")).build();
         } catch (AutoscalerServicePolicyDoesNotExistExceptionException e) {
             return Response.status(Response.Status.NOT_FOUND).build();
         }