Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-55763

Not parsing errors returned from Bitbucket Server

XMLWordPrintable

      When I was trying to save Bitbucket pipeline I get the following error show below

      The problem appears to be that when an error is returned from Bitbucket it is not in the expected format.

      I manually called the API using postman to try and determine the problem. The message returned was:

      {
      "errors": [

      { "context": null, "message": "When performing an edit, the author must have an e-mail address.", "exceptionName": "com.atlassian.bitbucket.validation.ArgumentValidationException" }

      ]
      }

       

      ERROR:

      Jan 24, 2019 1:11:46 PM io.jenkins.blueocean.blueocean_bitbucket_pipeline.HttpResponse getContent
      SEVERE: An error occurred getting BitBucket API error content
      net.sf.json.JSONException: JSONObject["details"] is not a JSONArray.
      at net.sf.json.JSONObject.getJSONArray(JSONObject.java:1986)
      at io.jenkins.blueocean.blueocean_bitbucket_pipeline.HttpResponse.getContent(HttpResponse.java:56)
      at io.jenkins.blueocean.blueocean_bitbucket_pipeline.server.BitbucketServerApi.saveContent(BitbucketServerApi.java:221)
      at io.jenkins.blueocean.blueocean_bitbucket_pipeline.AbstractBitbucketScmContentProvider.saveContent(AbstractBitbucketScmContentProvider.java:125)
      at io.jenkins.blueocean.rest.impl.pipeline.ScmResourceImpl.saveContent(ScmResourceImpl.java:52)

            Unassigned Unassigned
            robertwnorris Robert Norris
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: