Uploaded image for project: 'Dev - Nexus Repo'
  1. Dev - Nexus Repo
  2. NEXUS-18855

/tags/associate does not return JSON if repository cannot be found

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.14.0
    • Fix Version/s: 3.15.0
    • Component/s: REST, Tags
    • Story Points:
      2

      Description

      Try to associate a tag to a set of components in a repository that does not exist. The response body is not JSON, but the response status code is 404.

      Try to associate a tag to a set of components in a repository that does exist, but the other search criteria do not match a valid component. The response body is JSON:

      Valid repo, but other search criteria do not find components
      {
        "status" : 404,
        "message" : "No components found"
      }
      

      And the status code is 404.

      The API documentation states that 404 status code is returned when components or repository is not found.

      Expected

      A REST API should return JSON with error details to help the caller understand problems, especially when the same error status code can be returned in multiple situations.

      When a repository name is specified that is not valid, then the response body should contain JSON explaining the cause of the 404.

      {
        "status" : 404,
        "message" : "No repository found"
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              plynch Peter Lynch
              Last Updated By:
              Peter Lynch Peter Lynch
              Team:
              NXRM - Cypher
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Date of First Response:

                  tigCommentSecurity.panel-title