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

Handle PR checkout 404 more gracefully #2756

Open
maxbeizer opened this issue Jan 11, 2021 · 0 comments
Open

Handle PR checkout 404 more gracefully #2756

maxbeizer opened this issue Jan 11, 2021 · 0 comments
Labels
core This issue is not accepting PRs from outside contributors enhancement a request to improve CLI gh-pr relating to the gh pr command

Comments

@maxbeizer
Copy link
Contributor

maxbeizer commented Jan 11, 2021

Describe the feature or problem you’d like to solve

When I attempt to checkout a PR but mistype the number, I expect to see a helpful error message.

Instead, I see the following

GraphQL error: Could not resolve to a PullRequest with the number of 12345.

Proposed solution

As an end user, I don't care about the implementation. I don't need to know there was a GraphQL error. I just want to know that there is not a PR with that number and perhaps a suggestion of what I should have typed.

Additional context

If I'm reading it right, it looks like https://github.com/cli/cli/blob/trunk/api/queries_pr.go#L144-L150 just returns the error. Perhaps there's a better UX pattern we can develop.

@maxbeizer maxbeizer added the enhancement a request to improve CLI label Jan 11, 2021
@vilmibm vilmibm added the core This issue is not accepting PRs from outside contributors label Jan 27, 2021
@samcoe samcoe added the gh-pr relating to the gh pr command label Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core This issue is not accepting PRs from outside contributors enhancement a request to improve CLI gh-pr relating to the gh pr command
Projects
None yet
Development

No branches or pull requests

3 participants