Uploaded image for project: 'Xray for Jira Cloud'
  1. Xray for Jira Cloud
  2. XRAYCLOUD-7372

As a user, I want Xray REST API status code is showing 403 instead of 400 when user do not have permissions to create issues

    XporterXMLWordPrintable

Details

    • Suggestion
    • Status: New
    • Resolution: Unresolved
    • None
    • None
    • REST API
    • None
    • UNCOVERED

    Description

      Currently, Xray REST APIs are showing correct error text, however, some response Status needs to be changed.

      Steps to reproduce:

      • Take an Xray project in which the user does not have permissions to create issues
      • Import Cucumber feature files into the project using REST API.
      • curl -H "Content-Type: multipart/form-data" -X POST -H "Authorization: Bearer $token" -F "file=@1.feature" https://xray.cloud.getxray.app/api/v1/import/feature?projectKey=DEMO 
      • Check for the Status response of the REST API

      It is expected that the status code should be 403(forbidden error) due to insufficient permissions, however, we get 400 error code. 

      Attachments

        Activity

          People

            helder.ferreira Helder Ferreira
            jayanthi.murthi Jayanthi Murthi
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: