Details
-
Bug
-
Resolution: Fixed
-
Medium
Description
While exploring the history of one of our projects via the API, I came across one of our earlier pull requests.
This is a request for the commits involved in a (merged) PR:
https://api.bitbucket.org/2.0/repositories/fairfax/coreplatforms-spock/pullrequests/17/commits
...but it yields a 404, with the error message:
{"error": {"message": "The source or destination could not be found."}}
This is consistent with the UI, which also reports no commits, but raises a bunch of questions:
- How did we end up with a merged PR with no commits in it? Did we rebase and destroy all the hashes involved?
- Surely an internal error like this should be a 500, not a 404?
- It looks like the code naively falls back from displaying the commits to generating a list based on the source and destination branches - but those obviously aren't present in a merged PR.