Retrieve Tag API endpoint returns HTML 404 response when tag doesn't exist

XMLWordPrintable

    • 1
    • Severity 3 - Minor

      Summary

      Retrieve Tag Rest Endpoint returns 404 html response when it should return a JSON response. As per documentation:
      Retrieve a tag in the specified repository.

      Environment

      Bitbucket 4.14 +

      Steps to Reproduce

      Enter the following URL for tag that doesn't exist.
      /rest/api/1.0/projects/

      {projectKey}

      /repos/

      {repositorySlug}

      /tags/

      {name:.*}

      This will return 404 HTML response instead of a JSON

      Expected Results

      Expected JSON response. Example:

      {
          "errors": [
              {
                  "context": null,
                  "message": "A detailed error message.",
                  "exceptionName": null
              }
          ]
      } 
      

      Actual Results

      Received HTML 404 response

      • 404 Not Found

      Workaround

      N/A

            Assignee:
            Unassigned
            Reporter:
            Lonnie
            Votes:
            1 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: