Skip to content

Commit 2853125

Browse files
committed
add a proper warning for expired or invalid refresh tokens
1 parent db76bdd commit 2853125

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/pkg/auth/auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ func GetValidAccessToken(p *print.Printer) (string, error) {
202202
// Refresh the tokens
203203
err = refreshTokens(utf)
204204
if err != nil {
205-
return "", fmt.Errorf("refresh access token: %w", err)
205+
return "", fmt.Errorf("access token expired and refresh token is invalid. Please run 'stackit auth login' to re-authenticate: %w", err)
206206
}
207207

208208
// Return the new access token

0 commit comments

Comments
 (0)