Workflow REST API causes Internal Error on a non-existent workflow parameter

XMLWordPrintable

    • 7.09
    • Severity 3 - Minor

      Summary

      Requesting GET /rest/api/2/workflow where query parameter workflowName's value is a non-existent workflow, Jira returns an HTTP 500 - Internal Server Error

      Sample Call using HTTPie:

      http --auth admin:admin --verbose GET http://localhost/jira/rest/api/2/workflow workflowName=="No such workflow"
      

      Cause

      Line 113 in WorkflowsResource.java:

      String name = jiraWorkflow.getName();
      

      If the workflow is not found, then jiraWorkflow will be null, and a NPE is thrown.

              Assignee:
              Anne Calantog
              Reporter:
              David Pinn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: