Skip to content

Conversation

@scotwells
Copy link
Contributor

When a user's access token was expired, the CLI would try to refresh the access token but it would encounter a panic because the context was nil.

This resolves the issue by passing the context through to the factory so it can be used when refreshing the access token.

panic: nil context

goroutine 1 [running]:
net/http.(*Request).WithContext(...)
        /opt/hostedtoolcache/go/1.25.6/x64/src/net/http/request.go:370
...

I confirmed after updating this code, that I could invoke the command successfully again and it would get a new access token.


Follow up to #65

When a user's access token was expired, the CLI would try to refresh the
access token but it would encounter a panic because the context was
`nil`.

This resolves the issue by passing the context through to the factory so
it can be used when refreshing the access token.
@scotwells scotwells requested a review from gianarb January 22, 2026 17:33
Copy link
Collaborator

@gianarb gianarb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@gianarb gianarb merged commit 710ca4f into main Jan 22, 2026
1 check passed
@gianarb gianarb deleted the fix/resolve-panic-on-token-refresh branch January 22, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants