Skip to content

Commit 73f9984

Browse files
committed
fix: set context to avoid panic on token refresh
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.
1 parent 499dd2f commit 73f9984

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

internal/client/factory.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ func NewDatumFactory(ctx context.Context) (*DatumCloudFactory, error) {
175175
baseConfigFlags.Context = nil
176176
configFlags := &CustomConfigFlags{
177177
ConfigFlags: baseConfigFlags,
178+
Context: ctx,
178179
Project: func() *string {
179180
m := ""
180181
return &m

0 commit comments

Comments
 (0)