File tree Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Expand file tree Collapse file tree 2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,8 @@ func getBearerToken(p *print.Printer) (string, error) {
183183
184184 accessToken , err := auth .GetValidAccessToken (p )
185185 if err != nil {
186- return "" , err
186+ p .Debug (print .ErrorLevel , "get valid access token: %v" , err )
187+ return "" , & errors.SessionExpiredError {}
187188 }
188189
189190 return accessToken , nil
Original file line number Diff line number Diff 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 ("access token expired and refresh token is invalid. Please run 'stackit auth login' to re-authenticate : %w" , err )
205+ return "" , fmt .Errorf ("access token and refresh token expired : %w" , err )
206206 }
207207
208208 // Return the new access token
You can’t perform that action at this time.
0 commit comments