# Azure devops - build fails randomly with - Could not find the pullrequest with key x

**URL:** <https://community.sonarsource.com/t/azure-devops-build-fails-randomly-with-could-not-find-the-pullrequest-with-key-x/43535>\
**Category:** SonarQube Cloud\
**Tags:** azure, sonarqube-cloud\
**Created:** [May 20, 2021, 11:32am UTC](https://community.sonarsource.com/t/azure-devops-build-fails-randomly-with-could-not-find-the-pullrequest-with-key-x/43535 "2021-05-20T11:32:11Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Marcin\_Majewski](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/marcin_majewski/32/15358_2.png) [@Marcin\_Majewski](https://community.sonarsource.com/u/Marcin_Majewski)\
**Post date:** [June 9, 2021, 3:05pm UTC](https://community.sonarsource.com/t/azure-devops-build-fails-randomly-with-could-not-find-the-pullrequest-with-key-x/43535/3 "2021-06-09T15:05:16Z")

</div>

Hey @SimonBrettschneider,

Welcome to the community and apologies for the late reply!

This kind of error is being thrown only when the pull request that you are referring to with the pull request key was not created on the Azure before analysis. Can it be the case in your setup? Is the pull request always created before you run the analysis?

I have one more question. You mentioned Bitbucket Cloud and Azure, are you using azure pipelines to analyze the code and bitbucket as a code repository? Or everything is done in Azure?

Best,  
Marcin

---

_[View the full topic](https://community.sonarsource.com/t/azure-devops-build-fails-randomly-with-could-not-find-the-pullrequest-with-key-x/43535)._
