Trying to create a PR from a fork which does not exist with a user access token (UAT) results in a 500 and no info #201202
Replies: 3 comments
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
Yess : ( that 500 error is 100% a backend crash on GitHub's side. The UAT auth pipeline is hitting an unhandled exception when trying to check permissions for a fork that doesn't exist. It just crashes before it even reaches the normal 422 validation logic that classic PATs use. Until they patch it, your only real option is to just add a quick preflight API call in your code to verify the fork actually exists before you hit the POST endpoint. Sucks you have to write extra code just to avoid their server crash, but that's the only reliable way around it right now. |
Beta Was this translation helpful? Give feedback.
-
|
Based on your description, this looks like inconsistent error handling. The same request returns a Since the request succeeds with the same UAT after the fork and branch are created, it doesn't appear to be a general permissions issue. It seems more likely that the lookup of the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
API
Body
endpoint:
POST /repos/{owner}/{repo}/pullsparameters:
basewhich existsheadin compound form (user:branch),userexists but has not forked the repositoryclassic PAT
this results in a 422 "Validation Failed" with the error details
{'code': 'invalid', 'field': 'head', 'resource': 'PullRequest'}UAT
this results in an error 500 with no body
complementary information
Beta Was this translation helpful? Give feedback.
All reactions