xebialabs-community/xld-apigee-plugin

empty JSON body error when 504 is returned

Closed this issue · 1 comments

When we get a 504, the response is empty and therefore response.json() does not work. We will take care of this.

Failed XL Deploy Task: 'a1a5d67f-7358-4412-a7bd-3726c4eb8a9f' State: 'FAILED' 
https://api.enterprise.apigee.com/v1/organizations/levent/apis Multi factor authentication is on 504 [ERROR]: Error while executing script [apigee/upload-api-proxy-and-deploy.py]: ValueError: No JSON object could be decoded in <script> at line number 16 [ERROR]: com.xebialabs.platform.script.jython.JythonException: Error while executing script [apigee/upload-api-proxy-and-deploy.py]: ValueError: No JSON object could be decoded in <script> at line number 16 [ERROR]: at com.xebialabs.platform.script.jython.JythonException$.apply(JythonException.scala:17) [ERROR]: at com.xebialabs.platform.script.jython.JythonSupport.$anonfun$executeScript$3(JythonSupport.scala:44) [ERROR]: at com.xebialabs.platform.script.jython.JythonSupport.withThreadLocalWriter(JythonSupport.scala:51) [ERROR]: at com.xebialabs.platform.script.jython.JythonSupport.executeScript(JythonSupport.scala:40) [ERROR]: at com.xebialabs.platform.script.jython.JythonSupport.executeScript$(JythonSupport.scala:37) [ERROR]: at com.xebialabs.deployit.plugin.steps.JythonStep$$anon$1.executeScript(JythonStep.scala:27) [ERROR]: at com.xebialabs.platform.script.jython.JythonSupport.executeScript(JythonSupport.scala:34) [ERROR]: at com.xebialabs.platform.script.jython.JythonSupport.executeScript$(JythonSupport.scala:28) [ERROR]: at com.xebialabs.deployit.plugin.steps.JythonStep$$anon$1.executeScript(JythonStep.scala:27) [ERROR]: at com.xebialabs.deployit.plugin.steps.JythonStep.executeScript(JythonStep.scala:66) [ERROR]: at com.xebialabs.deployit.plugin.steps.JythonStep.execute(JythonStep.scala:57) [ERROR]: at com.xebialabs.deployit.engine.tasker.StepExecutingActor.$anonfun$executeStep$2(StepExecutingActor.scala:128) [ERROR]: at com.xebialabs.deployit.engine.tasker.MdcUtils$.withMdc(MdcUtils.scala:16) [ERROR]: at com.xebialabs.deployit.engine.tasker.StepExecutingActor.$anonfun$executeStep$1(StepExecutingActor.scala:118) [ERROR]: at 

v1.2.0 is taking care of this.