Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add warning log to gates init (#10268)

authored by

Eric Bailey and committed by
GitHub
8c5899fc 6d8b4a20

+10 -1
+9 -1
src/analytics/features/index.ts
··· 2 2 import {setPolyfills} from '@growthbook/growthbook' 3 3 import {GrowthBook} from '@growthbook/growthbook-react' 4 4 5 + import {Logger} from '#/logger' 5 6 import {getNavigationMetadata, type Metadata} from '#/analytics/metadata' 6 7 import * as env from '#/env' 7 8 8 9 export {Features} from '#/analytics/features/types' 9 10 11 + const logger = Logger.create(Logger.Context.Growthbook) 10 12 const CACHE = new MMKV({id: 'bsky_features_cache'}) 11 13 12 14 setPolyfills({ ··· 44 46 * initialization completes. 45 47 */ 46 48 export const init = new Promise<void>(async y => { 47 - await features.init({timeout: TIMEOUT_INIT}) 49 + const res = await features.init({timeout: TIMEOUT_INIT}) 50 + if (!res.success) { 51 + logger.warn('GrowthBook initialization failed or timed out', { 52 + source: res.source, 53 + safeMessage: res.error?.toString(), 54 + }) 55 + } 48 56 y() 49 57 }) 50 58
+1
src/logger/types.ts
··· 16 16 PolicyUpdate = 'policy-update', 17 17 Geolocation = 'geolocation', 18 18 Drafts = 'drafts', 19 + Growthbook = 'growthbook', 19 20 20 21 /** 21 22 * METRIC IS FOR INTERNAL USE ONLY, don't create any other loggers using this