This commit is contained in:
2026-10-15 19:39:23 +03:00
parent 69fb0bf741
commit 4b54b97162
5 changed files with 82 additions and 2 deletions
+5 -1
View File
@@ -3,6 +3,7 @@ package store
import (
"context"
"errors"
"fmt"
"strconv"
"sync/atomic"
"time"
@@ -137,7 +138,10 @@ func (s *Store) GetChat(ctx context.Context, chatID, userID string) (model.Chat,
).Scan(&c.ID, &c.Title, &c.CreatedAt)
if err != nil {
return model.Chat{}, ErrChatNotFound
if errors.Is(err, pgx.ErrNoRows) {
return model.Chat{}, ErrChatNotFound
}
return model.Chat{}, fmt.Errorf("get chat: %w", err)
}
memberIDs, err := s.listChatMemberIDs(ctx, c.ID)