Skip to content

Commit 8b2352e

Browse files
committed
Update usage.go
1 parent c3d2ce0 commit 8b2352e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

premium/usage.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ func (u *BatchUpdater) CheckQuota(ctx context.Context) (CheckQuotaResult, error)
410410
return CheckQuotaResult{HasQuota: false}, fmt.Errorf("failed to get usage: %w", err)
411411
}
412412
if usage.StatusCode() != http.StatusOK {
413+
if u.tokenClient.GetTokenType() == auth.APIKey && usage.StatusCode() == http.StatusForbidden {
414+
u.logger.Warn().Msg("API Key may have expired. Please see the CloudQuery Console see the expiration status.")
415+
}
413416
return CheckQuotaResult{HasQuota: false}, fmt.Errorf("failed to get usage: %s", usage.Status())
414417
}
415418

0 commit comments

Comments
 (0)