From f4d96018816681cbd4e2d2c65f0e810a3f0a9308 Mon Sep 17 00:00:00 2001 From: SJCoetz Date: Wed, 29 Jul 2026 15:03:24 +0200 Subject: [PATCH] chore(item-history): fix auth docstring, log AI read failures Co-authored-by: Orca --- src/app/api/v1/quote_items/[id]/item-history/route.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/api/v1/quote_items/[id]/item-history/route.ts b/src/app/api/v1/quote_items/[id]/item-history/route.ts index fa78031..115aa01 100644 --- a/src/app/api/v1/quote_items/[id]/item-history/route.ts +++ b/src/app/api/v1/quote_items/[id]/item-history/route.ts @@ -18,7 +18,7 @@ export const dynamic = "force-dynamic"; * - `ai` — AI blob only; skip the service call. * - `none` — 404; trigger hides itself. * - * Auth: same as the rest of `/api/v1` (no Bearer required, uses admin PB). + * Auth: uses admin PB; no Bearer required (read-only SKU aggregates). */ type Mode = "both" | "deterministic" | "ai" | "none"; @@ -76,8 +76,9 @@ export async function GET( // Malformed JSON — leave `ai` null and continue. } } - } catch { - // Silent: deterministic side still works. + } catch (err) { + // Deterministic side still works; log so debugging isn't blind. + console.warn("[item-history] AI blob read failed:", err); } }