···3030import {aggregateUserInterests} from '#/lib/api/feed/utils'
3131import {FeedTuner, type FeedTunerFn} from '#/lib/api/feed-manip'
3232import {DISCOVER_FEED_URI} from '#/lib/constants'
3333-import {BSKY_FEED_OWNER_DIDS} from '#/lib/constants'
3433import {logger} from '#/logger'
3534import {useAgeAssuranceContext} from '#/state/ageAssurance'
3635import {STALE} from '#/state/queries'
···208207 cursor: undefined,
209208 }
210209211211- try {
212212- const res = await api.fetch({cursor, limit: fetchLimit})
210210+ const res = await api.fetch({cursor, limit: fetchLimit})
213211214214- /*
215215- * If this is a public view, we need to check if posts fail moderation.
216216- * If all fail, we throw an error. If only some fail, we continue and let
217217- * moderations happen later, which results in some posts being shown and
218218- * some not.
219219- */
220220- if (!agent.session) {
221221- assertSomePostsPassModeration(
222222- res.feed,
223223- preferences?.moderationPrefs ||
224224- DEFAULT_LOGGED_OUT_PREFERENCES.moderationPrefs,
225225- )
226226- }
212212+ /*
213213+ * If this is a public view, we need to check if posts fail moderation.
214214+ * If all fail, we throw an error. If only some fail, we continue and let
215215+ * moderations happen later, which results in some posts being shown and
216216+ * some not.
217217+ */
218218+ if (!agent.session) {
219219+ assertSomePostsPassModeration(
220220+ res.feed,
221221+ preferences?.moderationPrefs ||
222222+ DEFAULT_LOGGED_OUT_PREFERENCES.moderationPrefs,
223223+ )
224224+ }
227225228228- return {
229229- api,
230230- cursor: res.cursor,
231231- feed: res.feed,
232232- fetchedAt: Date.now(),
233233- }
234234- } catch (e) {
235235- const feedDescParts = feedDesc.split('|')
236236- const feedOwnerDid = new AtUri(feedDescParts[1]).hostname
237237-238238- if (
239239- feedDescParts[0] === 'feedgen' &&
240240- BSKY_FEED_OWNER_DIDS.includes(feedOwnerDid)
241241- ) {
242242- logger.error(`Bluesky feed may be offline: ${feedOwnerDid}`, {
243243- feedDesc,
244244- jsError: e,
245245- })
246246- }
247247-248248- throw e
226226+ return {
227227+ api,
228228+ cursor: res.cursor,
229229+ feed: res.feed,
230230+ fetchedAt: Date.now(),
249231 }
250232 },
251233 initialPageParam: undefined,