github / github/gh-codeql

Better error message for expired/invalid PAT

Open
#17 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Shell
Stars
43
Forks
13
PR merge metrics
No merged PRs in 30d

Description

```
$ gh codeql list-versions
expected an object but got: string ("https://docs.github.com/rest")
```

I haven't investigated, but perhaps this is making an invalid API request.

---

EDIT: The reason for the error was an expired PAT. Leaving this issue open so we can provide a better error message in this case.

Contributor guide

Open the contributing guide

Research direction

Start with the `gh codeql list-versions` entry point and reproduce the command using an expired or invalid PAT. Trace how the failed response is handled and define done as showing a clear authentication error instead of the reported object-versus-string message; the issue does not name a test or source file.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, shell
Domain
api, authentication, cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.