summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--internal/api/api.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/internal/api/api.go b/internal/api/api.go
index 804980f..a075153 100644
--- a/internal/api/api.go
+++ b/internal/api/api.go
@@ -107,6 +107,14 @@ func (a *API) authorize(ctx context.Context) (err error) {
return nil
}
+ // otherwise check if invalid tokens,
+ // if not then something else is wrong with the API
+ // return an error
+ tErr := &eduoauth.TokensInvalidError{}
+ if !errors.As(err, &tErr) {
+ return err
+ }
+
if a.Data.DisableAuthorize {
return ErrAuthorizeDisabled
}