-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
9.4.8, 9.4.11
-
None
-
2
-
Severity 3 - Minor
-
3
-
Issue Summary
Bitbucket Get tag API isn't behaving as expected, the API returns a 404 status code without the expected JSON response when the tag doesn't exist. As per our API docs, the 404 should be returned when "The specified tag does not exist", but that's not happening and there's an empty response in case the tag doesn't exist.
Steps to Reproduce
- Created a tag called release-tag.
- Ran the below API for a tag that doesn't exist:
curl -I -u admin --request GET \ --url 'https://{baseurl}/projects/FIR/repos/avengers-repo/tags/new-tag' \ --header 'Accept: application/json;charset=UTF-8' Enter host password for user 'admin': HTTP/1.1 404 Date: Mon, 22 Sep 2025 06:02:16 GMT Transfer-Encoding: chunked Connection: keep-alive Set-Cookie: INGRESSCOOKIE=9b7d1ee375fc7c3677f0f6b1b6e59071|720acc58e4038854b40f095cb766f636; Path=/; HttpOnly X-AREQUESTID: @1SU4UN1x362x7573x0 X-AUSERID: 2 X-AUSERNAME: admin Cache-Control: no-cache, no-transform Vary: X-AUSERNAME Vary: X-AUSERID Vary: Cookie X-Content-Type-Options: nosniff
"-I" is to get the response code. Notice that the response code is 404 but the response body is empty.
Expected Results
If the tag doesn't exist, the GET query should return 404 with "The specified tag does not exist. in the response body
Actual Results
The GET query returns 404 but an empty response body.
Workaround
Currently there is no known workaround for this behavior. A workaround will be added here when available.