You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm facing an issue with our custom integration that is designed to fetch the list of repositories, pull requests, and commits. The calls are made with a token generated using OAuth consumer authorised by an admin user.
I am able to retrieve the list of repositories and pull requests successfully, but when attempting to fetch the commit data, in some cases I receive a 404 error with the message "The source or destination could not be found."
Here's a description of the issue I'm encountering, highlighting the steps and relevant details:
I have attempted the following steps to resolve the issue:
Unfortunately, after trying the above troubleshooting steps, the problem persists.
The API call URL format is: https://api.bitbucket.org/2.0/repositories/<workspace-name>/<repository-name>/pullrequests/<pullrequet-id>/commits?pagelen=10
To provide more context, I've included the following screenshot for OAuth consumer permissions:
I would appreciate any guidance or suggestions from the community regarding the possible causes of this issue and how it might be resolved. Are there any additional steps I should take to further troubleshoot the problem, or any known issues that could be causing such an error when using OAuth consumers for admin users?
Thank you in advance for your help!
Hi Amin and welcome to the community!
This error doesn't have anything to do with the OAuth consumer, it occurs when the list of commits involved in the PR doesn't exist. This can happen if someone rewrites history or rebases and with a force push removes commits associated with a pull request. The API then returns a 404 error with this message since the list of commits doesn't exist.