fix: log only errors on refreshing

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
m.nabokikh 2022-04-12 17:21:35 +04:00
parent c8ff7ed40a
commit ad89e01676

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
}