-
Suggestion
-
Resolution: Fixed
-
None
Problem Definition
REST API endpoint for the default branch returns a 404 for empty repositories when just created by Bitbucket:
projects/pkey/repos/rslug/branches/default
Suggested Solution
When using the REST point:
- for empty repos: return the equivalent of the "Not defined" value shown in the webpage (see attached screenshot).
- for the repos with an invalid default, 404 is legitimate (current behavior)
Workaround
Use a try/catch block and post-process the list of 404 repos with /branches to separate the really empty from the misconfigured.
- incorporates
-
BSERV-10312 Repository Browse REST API 404
- Closed