Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

catch error if pr has already been created #36

Open
Somberland opened this issue Nov 25, 2019 · 0 comments
Open

catch error if pr has already been created #36

Somberland opened this issue Nov 25, 2019 · 0 comments

Comments

@Somberland
Copy link
Member

response:

{"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for anfema:p.skorpil/3252-create-basic-routings-for-pool-and-new-sales-system."}],"documentation_url":"https://developer.github.com/v3/pulls/#create-a-pull-request"}
    at /Users/philippskorpil/.config/yarn/global/node_modules/@octokit/rest/lib/request/request.js:72:19
    at processTicksAndRejections (internal/process/task_queues.js:85:5)
    at async module.exports (/Users/philippskorpil/.config/yarn/global/node_modules/work/src/create-pullrequest.js:65:15)
    at async /Users/philippskorpil/.config/yarn/global/node_modules/work/index.js:27:5 {
  name: 'HttpError',
  code: 422,
  status: undefined,
  headers: {
    'access-control-allow-origin': '*',
    'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type',
    connection: 'close',
    'content-length': '289',
    'content-security-policy': "default-src 'none'",
    'content-type': 'application/json; charset=utf-8',
    date: 'Mon, 25 Nov 2019 09:32:31 GMT',
    'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
    server: 'GitHub.com',
    status: '422 Unprocessable Entity',
    'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
    'x-accepted-oauth-scopes': '',
    'x-content-type-options': 'nosniff',
    'x-frame-options': 'deny',
    'x-github-media-type': 'github.v3; format=json',
    'x-github-request-id': 'D9FE:32664:12369D:175BD4:5DDB9FAE',
    'x-oauth-scopes': 'admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, gist, notifications, repo, user, write:discussion',
    'x-ratelimit-limit': '5000',
    'x-ratelimit-remaining': '4996',
    'x-ratelimit-reset': '1574677948',
    'x-xss-protection': '1; mode=block'
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant