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

There is a way to verify if PR creation failed? #284

Open
emanuel-braz opened this issue Dec 8, 2021 · 3 comments
Open

There is a way to verify if PR creation failed? #284

emanuel-braz opened this issue Dec 8, 2021 · 3 comments

Comments

@emanuel-braz
Copy link

emanuel-braz commented Dec 8, 2021

I'm getting this error: GitHub Error: Message: Draft pull requests are not supported in this repository., but I can't handle the errors, because they are never throwed. There is a way to verify if PR creation failed? I need to show the error message to the users.

I made this temporarily validation, to get notice when error are dispatched, but I'd like to know if already there is a better way/correct way?

github.dart:248
Screen Shot 2021-12-07 at 22 23 19

@github-actions
Copy link

github-actions bot commented Dec 8, 2021

👋 Thanks for reporting! @robrbecker will take a look.

@shatanikmahanty
Copy link

shatanikmahanty commented Feb 1, 2022

According to github api docs the status codes which result in pr creation failed are :

  • Status: 403 Forbidden
  • Status: 422 Unprocessable Entity

@shatanikmahanty
Copy link

However I couldnot find status 422 inside the library StatusCodes abstract class. So it could be possible that the error you are encountering is thus not thrown because of missing status code

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

2 participants