diff --git a/packages/core/src/analytics/posthogAiBetaServerClient/featureFlagEvaluation.ts b/packages/core/src/analytics/posthogAiBetaServerClient/featureFlagEvaluation.ts index e15d9d465..83cf49f9a 100644 --- a/packages/core/src/analytics/posthogAiBetaServerClient/featureFlagEvaluation.ts +++ b/packages/core/src/analytics/posthogAiBetaServerClient/featureFlagEvaluation.ts @@ -26,6 +26,8 @@ const getKv = async () => { }; export const cachedFetch: PostHog["fetch"] = async (url, options) => { + log.info("cachedFetch called", { url }); + if (url.includes("api/feature_flag/local_evaluation")) { const kvCachedResponse = await getKv(); if (kvCachedResponse) { @@ -38,6 +40,8 @@ export const cachedFetch: PostHog["fetch"] = async (url, options) => { const cachedResult = result.clone(); await setKv(cachedResult); log.info("evaluations cached to KV"); + } else { + log.error("failed to load evaluations", { status: result.status }); } return result;