Merge pull request #2470 from flant/refresh-token-log-only-errors

fix: log only errors on refreshing
This commit is contained in:
Maksim Nabokikh 2022-04-15 17:20:02 +04:00 committed by GitHub
commit b26e639515
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,11 +66,10 @@ func (s *Server) getRefreshTokenFromStorage(clientID string, token *internal.Ref
refresh, err := s.storage.GetRefresh(token.RefreshId)
if err != nil {
s.logger.Errorf("failed to get refresh token: %v", err)
if err != storage.ErrNotFound {
s.logger.Errorf("failed to get refresh token: %v", err)
return nil, newInternalServerError()
}
return nil, invalidErr
}