Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-69218

Invalid error output on API endpoint

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Low Low
    • None
    • 7.6.13, 7.12.3, 7.13.1, 8.1.0
    • REST API
    • None

      Issue Summary

      When entering an invalid value for a POST call to at the Add share permission endpoint gives invalid values in the error noting as valid causing confusion in troubleshooting the error:

      Steps to Reproduce

      1. [POST /rest/api/2/filter/ {id}

        /permission | https://docs.atlassian.com/software/jira/docs/api/REST/8.1.0/#api/2/filter-addSharePermission]

      2. using invalid option for data package

      Expected Results

      The error output will show Valid values (Noting case sensativity): project, group, projectRole, global, authenticated

      Actual Results

      The API return with the following error:

      {
      "errorMessages": [
      "Invalid type given. Should be one of [PROJECT, GROUP, PROJECT_ROLE, GLOBAL, AUTHENTICATED, USER]"
      ],
      "errors": {}
      }
      

      Notes

      This gives improper values as valid options noting invalid case sensitivity as well: "Should be one of [PROJECT, GROUP, PROJECT_ROLE, GLOBAL, AUTHENTICATED, USER]"

      Workaround

      Use the Valid values (Noting case sensitivity): project, group, projectRole, global, authenticated

              Unassigned Unassigned
              emccutcheon Earl McCutcheon (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: