Skip to content

Handle PR checkout 404 more gracefully #2756

Open

Description

@maxbeizer

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.

Activity

  1. added
    enhancement
    on Jan 11, 2021
  2. added
    core
    on Jan 27, 2021
  3. added
    gh-pr
    on Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreenhancementgh-pr

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions