lab2: review round 2 — cache versioning, UUID normalization, cursor validation, benchmark evidence

This commit is contained in:
2026-10-10 08:13:56 +03:00
parent 24fe6e23d2
commit 3dca6ff635
3 changed files with 10 additions and 17 deletions
+3 -1
View File
@@ -68,7 +68,9 @@ func (s *AuthService) ValidateSession(ctx context.Context, token string) (*domai
if errors.Is(err, repository.ErrNotFound) {
return nil, ErrUnauthorized
}
return nil, err
// Redis недоступен — возвращаем 401, чтобы клиент перелогинился,
// либо 503, если хотим явно показать проблему зависимости.
return nil, ErrUnauthorized // ← было: return nil, err
}
if nowUTC().After(sess.ExpiresAt) {
_ = s.sessions.Delete(ctx, token)