API errors to /api/v2/issue/{issueIdOrKey} endpoint misleading

XMLWordPrintable

    • 2
    • 4

      Issue Summary

      There are instances where Jira error returns are either vague or do not point to the actual issue at hand. In order to assist with troubleshooting issues it would be beneficial if error returns pointed to actual cause. 

      Steps to Reproduce

      One recent example is described below:

      • Leverage API endpoint /api/v2/issue/{issueIdOrKey} to alter/update an Epic
        • APIRequestMethod: PUT
               APIRequestUrl: /rest/api/2/issue/xxxxxx
               APIResource: rest/api/2/issue/\{issueid}
               APIResponseStatus: Completed
               APIResponseStatusCode: BadRequest
               APIResponseStatusCodeValue: 400 
      • Logs present, what appears to be, a permissions issue.
        • JsonErrorMessages: Issue does not exist or you do not have permission to see it.

      Actual Results

      While investigating this scenario it was found the presented error was not accurate. The actual failure was due to a payload issue where incorrect fields were being referenced. In this case the new 'Parent' field. 

      •      "customfield_xxxxx":
                [
                    \{"set": "No Parent"}
                ],
      • In other instances with similar calls, Jira does a good job of pointing directly to the actual issue.
        • JsonErrors: customfield_xxxxxx=Field 'customfield_xxxxx' cannot be set. It is not on the appropriate screen, or unknown.
      • For some reason, this type of error is not logged, a more generic and misleading one is. 

      Suggestion

      Please provide more clarity to actual failures when updating endpoints. 

      Parent issue does not exist or you do not have permission to see it. 

              Assignee:
              Unassigned
              Reporter:
              Andy Launer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: