[HAP-1057] Build to a non-existing repo throws an exception Created: 11/Apr/18  Updated: 09/Jul/18  Resolved: 09/Jul/18

Status: Resolved
Project: Jenkins Artifactory Plug-in
Component/s: Release Management
Affects Version/s: 2.15.0
Fix Version/s: 2.16.2

Type: Bug Priority: Normal
Reporter: Maayan Amrani Assignee: Bar Belity
Resolution: Fixed Votes: 0
Labels: None


 Description   

When promoting a build to a non-existing repo there's a stuck trace with no indication that the provided repo doesn't exist.

Stuck trace as the following:

 
net.sf.json.JSONException: JSONObject["messages"] is not a JSONArray.
at net.sf.json.JSONObject.getJSONArray(JSONObject.java:1986)
at org.jfrog.hudson.release.PromotionUtils.checkSuccess(PromotionUtils.java:67)
at org.jfrog.hudson.release.PromotionUtils.promoteAndCheckResponse(PromotionUtils.java:38)
at org.jfrog.hudson.pipeline.executors.PromotionExecutor.execution(PromotionExecutor.java:56)
at org.jfrog.hudson.pipeline.steps.PromoteBuildStep$Execution.run(PromoteBuildStep.java:69)
at org.jfrog.hudson.pipeline.steps.PromoteBuildStep$Execution.run(PromoteBuildStep.java:38)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:47)
at hudson.security.ACL.impersonate(ACL.java:273)
at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE
 


Generated at Sun Oct 20 06:31:35 UTC 2019 using JIRA 7.6.16#76018-sha1:9ed376192612a49536ac834c64177a0fed6290f5.