Config object key references resolve
Why it matters
A reference like config.stripe.priceIds.pro that does not exist in the config object evaluates to undefined at runtime, which then propagates into a Stripe API call as { price: undefined } and produces a confusing No such price error in logs — not a crash at the config call site. Reference integrity at the configuration layer matters because the failure surfaces far downstream, often in a webhook handler where the original intent is lost. AI tools invent config keys confidently.
Severity rationale
Low because the failure only surfaces in code paths that exercise the bad key, though the downstream error can be misleading.
Remediation
Define the config object as the single source of truth in src/lib/config.ts and use as const so TypeScript catches typos at build time under tsc --noEmit:
export const config = {
stripe: {
priceIds: { pro: 'price_xxx', team: 'price_yyy' },
},
} as const
Either add the missing key to the object or fix the reference to match the real path.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Hallucinated References Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
Taxons
History
- 2026-04-18·v1.0.0·Initial import from ai-slop-hallucinations·automated