Skip to content

Commit a4398af

Browse files
sanjaytripathiMice Xia
authored andcommitted
CloudStack-1371 : In case of ResourceAllocationException, server is not returnig any response.
Signed-off-by: Mice Xia <mice_xia@tcloudcomputing.com>
1 parent a32c6d5 commit a4398af

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

api/src/org/apache/cloudstack/api/ServerApiException.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public ServerApiException(ApiErrorCode errorCode, String description, Throwable
4343
super(description, cause);
4444
_errorCode = errorCode;
4545
_description = description;
46-
if (cause instanceof CloudRuntimeException || cause instanceof CloudException ) {
46+
if (cause instanceof CloudRuntimeException) {
4747
CloudRuntimeException rt = (CloudRuntimeException) cause;
4848
ArrayList<String> idList = rt.getIdProxyList();
4949
if (idList != null) {
@@ -52,6 +52,15 @@ public ServerApiException(ApiErrorCode errorCode, String description, Throwable
5252
}
5353
}
5454
setCSErrorCode(rt.getCSErrorCode());
55+
} else if (cause instanceof CloudException) {
56+
CloudException rt = (CloudException) cause;
57+
ArrayList<String> idList = rt.getIdProxyList();
58+
if (idList != null) {
59+
for (int i = 0; i < idList.size(); i++) {
60+
addProxyObject(idList.get(i));
61+
}
62+
}
63+
setCSErrorCode(rt.getCSErrorCode());
5564
}
5665
}
5766

0 commit comments

Comments
 (0)