Skip to content

Commit 3201a53

Browse files
remove logic
1 parent b03710f commit 3201a53

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

pkg/auth/auth.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,11 +151,6 @@ func (t Auth) GetFreshAccessTokenOrNil() (string, error) {
151151
if !isAccessTokenValid && tokens.RefreshToken != "" {
152152
tokens, err = t.getNewTokensWithRefreshOrNil(tokens.RefreshToken)
153153
if err != nil {
154-
if strings.Contains(err.Error(), "UNAUTHORIZED") {
155-
// Clear the expired tokens
156-
_ = t.authStore.DeleteAuthTokens()
157-
return "", &breverrors.SessionExpiredError{HasPreviousSession: true}
158-
}
159154
return "", breverrors.WrapAndTrace(err)
160155
}
161156
if tokens == nil {

pkg/errors/errors.go

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -130,24 +130,6 @@ func (d *DeclineToLoginError) Directive() string { return "log in to run this co
130130

131131
var NetworkErrorMessage = "possible internet connection problem"
132132

133-
type SessionExpiredError struct {
134-
HasPreviousSession bool
135-
}
136-
137-
func (e *SessionExpiredError) Error() string {
138-
if e.HasPreviousSession {
139-
return "Your session has expired due to inactivity"
140-
}
141-
return "You are not logged in"
142-
}
143-
144-
func (e *SessionExpiredError) Directive() string {
145-
if e.HasPreviousSession {
146-
return "Please log in again to continue using the CLI"
147-
}
148-
return "Please log in to use the CLI"
149-
}
150-
151133
type CredentialsFileNotFound struct{}
152134

153135
func (e *CredentialsFileNotFound) Directive() string {

0 commit comments

Comments
 (0)