Error: Validation Failed
See original GitHub issueI’m getting a Validation Failed notification bubble every time I try to submit a pull request.
Here’s the output in the Output panel for the GitHub plugin:
GET https://api.github.com/repos/node-facebook/facebook-node-sdk
GET https://api.github.com/repos/node-facebook/facebook-node-sdk/pulls?state=open
Create pull request on branch 'type-errors'
pull request body: {
"sourceBranch": "type-errors",
"targetBranch": "master",
"title": "Throw a TypeError when passing bad arguments to FB.api",
"body": "Instead of logging to the console and returning undefined."
}
git config --local --get remote.origin.url
GET https://api.github.com/repos/node-facebook/facebook-node-sdk
POST https://api.github.com/repos/node-facebook/facebook-node-sdk/pulls
422 Validation Failed
Create pull request error: {
"url": "https://api.github.com/repos/node-facebook/facebook-node-sdk/pulls",
"status": 422,
"statusText": "Unprocessable Entity",
"headers": {
"_headers": {
"server": [
"GitHub.com"
],
"date": [
"Mon, 02 Apr 2018 02:14:15 GMT"
],
"content-type": [
"application/json; charset=utf-8"
],
"content-length": [
"184"
],
"connection": [
"close"
],
"status": [
"422 Unprocessable Entity"
],
"x-ratelimit-limit": [
"5000"
],
"x-ratelimit-remaining": [
"4941"
],
"x-ratelimit-reset": [
"1522638253"
],
"x-oauth-scopes": [
"repo"
],
"x-accepted-oauth-scopes": [
""
],
"x-github-media-type": [
"github.v3; format=json"
],
"access-control-expose-headers": [
"ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"
],
"access-control-allow-origin": [
"*"
],
"strict-transport-security": [
"max-age=31536000; includeSubdomains; preload"
],
"x-frame-options": [
"deny"
],
"x-content-type-options": [
"nosniff"
],
"x-xss-protection": [
"1; mode=block"
],
"referrer-policy": [
"origin-when-cross-origin, strict-origin-when-cross-origin"
],
"content-security-policy": [
"default-src 'none'"
],
"x-runtime-rack": [
"0.123812"
],
"x-github-request-id": [
"FCB2:41C8:212F62B:447666E:5AC191F7"
]
}
},
"ok": false,
"body": {
"_readableState": {
"objectMode": false,
"highWaterMark": 16384,
"buffer": {
"head": null,
"tail": null,
"length": 0
},
"length": 0,
"pipes": null,
"pipesCount": 0,
"flowing": true,
"ended": true,
"endEmitted": true,
"reading": false,
"sync": false,
"needReadable": false,
"emittedReadable": false,
"readableListening": false,
"resumeScheduled": false,
"defaultEncoding": "utf8",
"ranOut": false,
"awaitDrain": 0,
"readingMore": false,
"decoder": null,
"encoding": null
},
"readable": false,
"domain": null,
"_events": {},
"_eventsCount": 3,
"_writableState": {
"objectMode": false,
"highWaterMark": 16384,
"needDrain": false,
"ending": true,
"ended": true,
"finished": true,
"decodeStrings": true,
"defaultEncoding": "utf8",
"length": 0,
"writing": false,
"corked": 0,
"sync": false,
"bufferProcessing": false,
"writecb": null,
"writelen": 0,
"bufferedRequest": null,
"lastBufferedRequest": null,
"pendingcb": 0,
"prefinished": true,
"errorEmitted": false,
"bufferedRequestCount": 0,
"corkedRequestsFree": {
"next": null,
"entry": null
}
},
"writable": false,
"allowHalfOpen": true,
"_transformState": {
"needTransform": false,
"transforming": false,
"writecb": null,
"writechunk": null,
"writeencoding": "buffer"
}
},
"bodyUsed": true,
"size": 0,
"timeout": 0,
"_raw": [
{
"type": "Buffer",
"data": [
123,
34,
109,
101,
115,
115,
97,
103,
101,
34,
58,
34,
86,
97,
108,
105,
100,
97,
116,
105,
111,
110,
32,
70,
97,
105,
108,
101,
100,
34,
44,
34,
101,
114,
114,
111,
114,
115,
34,
58,
91,
123,
34,
114,
101,
115,
111,
117,
114,
99,
101,
34,
58,
34,
80,
117,
108,
108,
82,
101,
113,
117,
101,
115,
116,
34,
44,
34,
102,
105,
101,
108,
100,
34,
58,
34,
104,
101,
97,
100,
34,
44,
34,
99,
111,
100,
101,
34,
58,
34,
105,
110,
118,
97,
108,
105,
100,
34,
125,
93,
44,
34,
100,
111,
99,
117,
109,
101,
110,
116,
97,
116,
105,
111,
110,
95,
117,
114,
108,
34,
58,
34,
104,
116,
116,
112,
115,
58,
47,
47,
100,
101,
118,
101,
108,
111,
112,
101,
114,
46,
103,
105,
116,
104,
117,
98,
46,
99,
111,
109,
47,
118,
51,
47,
112,
117,
108,
108,
115,
47,
35,
99,
114,
101,
97,
116,
101,
45,
97,
45,
112,
117,
108,
108,
45,
114,
101,
113,
117,
101,
115,
116,
34,
125
]
}
],
"_abort": false,
"_bytes": 184
}
Validation Failed
Error: Validation Failed
at Object.<anonymous> (/Users/daniel/.vscode/extensions/KnisterPeter.vscode-github-0.27.1/out/src/provider/github/api.js:107:23)
at Generator.next (<anonymous>)
at fulfilled (/Users/daniel/.vscode/extensions/KnisterPeter.vscode-github-0.27.1/out/src/provider/github/api.js:13:58)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:135:7)
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
[error]Validation Failed Why does this error happen? · Issue #41
This my workflow yaml. I think there is no error. But it always fails. Someone can help me ? Thanks. # on: #...
Read more >Data validation failure - IBM
Data validation fails can fail if a customer provides invalid input. In such a scenario, Sterling Configurator enables a customer to identify it...
Read more >Unable to create github releases: Error: Validation Failed
I can see all my Repositories in the GitHubRelease@0 Task GUI (screenshot attached). But, it fails if I don't select "repositoryName: ...
Read more >Error: Validation failed When Create SQL Database
An error occurred when I am trying to create SQL database in Azure. "code": "InvalidDeploymentParameterValue", "message": "The value of ...
Read more >User receive only "Validation Failed" error message on the ...
Oracle Web Applications Desktop Integrator - Version 12.2 to 12.2.9 [Release 12.2]: User receive only "Validation Failed" error message on ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This also appears to be trying to create pull requests for an old version of the API. v3 uses different parameters.
For my use I think the correct pattern would be:
refs/heads/type-errors
usegit symbolic-ref -q HEAD
head to get itgit for-each-ref --format='%(upstream)' 'refs/heads/type-errors'
to get the upstream for this refrefs/remotes/dantman/type-errors
dantman
git config --local --get remote.dantman.url
to get the repo for thedantman
remote, instead of for originhead
for creating a pull request isdantman:type-errors
(the username from the remote url + the branch name from the upstream ref)base
dantman
remote that the upstream is targeting and use the branch named asdefault_branch
in the GitHub API as thebase
parent
of thedantman
remote that the upstream belongs to, which in this case isnode-facebook
as the target repo To find the presumed branch to merge into I believe this algorithim will workorigin
git for-each-ref --format "%(refname)" refs/remotes/origin
to find a list of branches on that remote, in this case (refs/remotes/origin/1.1.x
,refs/remotes/origin/HEAD
,refs/remotes/origin/azure
,refs/remotes/origin/master
,refs/remotes/origin/samples
)HEAD
(in this caserefs/remotes/origin/HEAD
) usegit show --no-patch --format=format:%cI $(git show-branch --merge-base "$REF")
to get the date of the latest common commit between that branch and the current one in ISO formatbase
will bemaster
The part which is not resolved now is this:
parent
of thedantman
remote that the upstream belongs to, which in this case isnode-facebook
as the target repo To find the presumed branch to merge into I believe this algorithim will workorigin
git for-each-ref --format "%(refname)" refs/remotes/origin
to find a list of branches on that remote, in this case (refs/remotes/origin/1.1.x
,refs/remotes/origin/HEAD
,refs/remotes/origin/azure
,refs/remotes/origin/master
,refs/remotes/origin/samples
)HEAD
(in this caserefs/remotes/origin/HEAD
) usegit show --no-patch --format=format:%cI $(git show-branch --merge-base "$REF")
to get the date of the latest common commit between that branch and the current one in ISO formatbase
will bemaster
Right now there is no “quick parent repo” command. So I guess this should be moved to its own issue.