[ 
https://issues.apache.org/jira/browse/SLING-8864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16983523#comment-16983523
 ] 

Robert Munteanu commented on SLING-8864:
----------------------------------------

I guess we should be able to check for anything :-). I assumed that all Jira 
responses are JSON, but what we can do is try to parse JSON, and if that fails 
return the response body itself. Can you add here what the response looks like, 
so I can add a test case + fix?

> Creating a new JIRA version fails
> ---------------------------------
>
>                 Key: SLING-8864
>                 URL: https://issues.apache.org/jira/browse/SLING-8864
>             Project: Sling
>          Issue Type: Bug
>          Components: Tooling
>            Reporter: Radu Cotescu
>            Assignee: Robert Munteanu
>            Priority: Major
>             Fix For: Committer CLI 1.0.0
>
>
> {noformat}
> docker run -it --env-file=./docker-env apache/sling-cli release 
> create-new-jira-version -r 2160 -x INTERACTIVE
> Found Version: Resource Resolver 1.6.16 (id=12346273, fixed issues=3).
> Should version Resource Resolver 1.6.18 be created?
> Yes (y)/No (n)? [Yes (y)]:
> Failed executing command
> java.io.IOException: Status line : HTTP/1.1 401 401. Failed parsing response 
> as JSON ( java.lang.IllegalStateException: Expected BEGIN_OBJECT but was 
> STRING at line 11 column 1 path $ )
>       at 
> org.apache.sling.cli.impl.jira.VersionClient.newException(VersionClient.java:235)
>       at 
> org.apache.sling.cli.impl.jira.VersionClient.create(VersionClient.java:156)
>       at 
> org.apache.sling.cli.impl.release.CreateJiraVersionCommand.run(CreateJiraVersionCommand.java:90)
>       at picocli.CommandLine.executeUserObject(CommandLine.java:1687)
>       at picocli.CommandLine.access$900(CommandLine.java:146)
>       at picocli.CommandLine$RunLast.handle(CommandLine.java:2059)
>       at picocli.CommandLine$RunLast.handle(CommandLine.java:2026)
>       at 
> picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1893)
>       at picocli.CommandLine.execute(CommandLine.java:1822)
>       at 
> org.apache.sling.cli.impl.CommandProcessor.runCommand(CommandProcessor.java:110)
>       at 
> org.apache.sling.cli.impl.ExecutionTrigger.lambda$activate$0(ExecutionTrigger.java:33)
>       at java.base/java.lang.Thread.run(Unknown Source)
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to