Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Getting "Validation Failed" error message when trying to create PR #453

Closed
grokys opened this issue Jul 27, 2016 · 2 comments
Closed

Getting "Validation Failed" error message when trying to create PR #453

grokys opened this issue Jul 27, 2016 · 2 comments
Assignees
Labels

Comments

@grokys
Copy link
Contributor

grokys commented Jul 27, 2016

Using the new 2.0 RC I'm getting a "Validation Failed" message when trying to create a PR:

image

@grokys grokys added the bug label Jul 27, 2016
@grokys
Copy link
Contributor Author

grokys commented Jul 27, 2016

This is happening because there is already a PR for the branch that I'm trying to create a PR for. The error that triggers the "Validation Failed" message is a Octokit.ApiValidationException and has the following information in its HttpResponseBodySafe property:

{"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ouchmyfoothurts:test1."}],"documentation_url":"https://developer.github.com/v3/pulls/#create-a-pull-request"}

So it looks like we need to parse the HTTP response to show a more meaningful error message.

@MelannieTorres-academico

I had a similar problem, the branch I was trying to make the PR to wasn't published, to fix it I changed to the branch I was creating the PR to ran: git push -u origin MY_BRANCH and tried to do the PR again :) Hope this is useful for somebody!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants