mirror of https://github.com/apache/cloudstack.git
bug 6733: re-throw ServerApiExceptions when dispatching API commands rather than logging them and throwing a generic INTERNAL_ERROR exception
status 6733: resolved fixed
This commit is contained in:
parent
90f10cded7
commit
95da86ef1a
|
|
@ -231,6 +231,8 @@ public class ApiDispatcher {
|
|||
throw new ServerApiException(BaseCmd.PARAM_ERROR, cause.getMessage());
|
||||
} else if (cause instanceof PermissionDeniedException) {
|
||||
throw new ServerApiException(BaseCmd.ACCOUNT_ERROR, cause.getMessage());
|
||||
} else if (cause instanceof ServerApiException) {
|
||||
throw (ServerApiException)cause;
|
||||
}
|
||||
s_logger.warn("Exception executing method " + methodName + " for command " + cmd.getClass().getSimpleName(), ite);
|
||||
throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Unable to execute method " + methodName + " for command " + cmd.getClass().getSimpleName() + ", internal error in the implementation.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue