Merge "[feat][core] calculate demo weight according to trigger set"
diff --git a/src/com/mirantis/mk/Http.groovy b/src/com/mirantis/mk/Http.groovy
index b752b42..a7e0f97 100644
--- a/src/com/mirantis/mk/Http.groovy
+++ b/src/com/mirantis/mk/Http.groovy
@@ -55,7 +55,10 @@
response = connection.inputStream.text
try {
response_content = new groovy.json.JsonSlurperClassic().parseText(response)
- } catch (groovy.json.JsonException e) {
+ } catch (groovy.json.JsonException|java.lang.NullPointerException e) {
+ if(env.getEnvironment().containsKey('DEBUG') && env['DEBUG'] == "true"){
+ println("[HTTP] Cought exception while trying parsing response as JSON: ${e}")
+ }
response_content = response
}
if(env.getEnvironment().containsKey('DEBUG') && env['DEBUG'] == "true"){