Merge pull request #31 from navi-infra/infra-425

INFRA-425 | Abhishek | Improve error message while applying
This commit is contained in:
Abhishek Katiyar
2020-07-28 17:09:56 +05:30
committed by GitHub Enterprise

View File

@@ -185,8 +185,10 @@ public class KubernetesManifestService {
namespace, clusterName);
log.info("Executing command {}", command);
if (BashExecute.execute(command) > 0) {
throw new RuntimeException(String.format("Unable to apply %s", manifestObject));
try{
BashExecute.execute(command);
}catch(RuntimeException runtimeException){
throw new RuntimeException(String.format("Unable to apply %s.Error = %s",manifestObject,runtimeException.getMessage()));
}
log.info("Successfully applied {}", manifestObject);
}