chore(item-history): fix auth docstring, log AI read failures

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
SJCoetz 2026-07-29 15:03:24 +02:00
parent e5a9221c3e
commit f4d9601881

View file

@ -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);
}
}