fix: classify database outages and restore real HTTP fault checks
This commit is contained in:
@@ -43,16 +43,16 @@ func (s *Store) Chats(ctx context.Context, userID uuid.UUID, position dto.Positi
|
||||
"user": userID, "time": position.CreatedAt, "id": position.ID, "limit": limit,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, normalize(err)
|
||||
}
|
||||
defer rows.Close()
|
||||
chats := make([]dto.ChatDTO, 0)
|
||||
for rows.Next() {
|
||||
var chat dto.ChatDTO
|
||||
if err := rows.Scan(&chat.ID, &chat.Title, &chat.CreatedAt, &chat.MemberIDs); err != nil {
|
||||
return nil, err
|
||||
return nil, normalize(err)
|
||||
}
|
||||
chats = append(chats, chat)
|
||||
}
|
||||
return chats, rows.Err()
|
||||
return chats, normalize(rows.Err())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user