No hardcoded fake data returned from API handlers
Why it matters
Handlers that return hardcoded fake data silently lie to every caller. Users see a populated list named "John Doe" with email "john@example.com" and assume the product is wired up, so the defect escapes QA, reaches paying customers, and often surfaces only after launch when real accounts should exist. Marketing dashboards, onboarding flows, and integration partners all pull from the mock and make wrong decisions. The placeholder-hygiene taxon exists because these fabrications corrupt trust long before they trigger an observable error.
Severity rationale
Critical because fake data in a live handler actively misleads users and downstream systems with zero error signal.
Remediation
Replace every hardcoded return with a real data source in the same request path. Wire the handler to your database client, upstream SDK, or request body; gate any remaining mock behind NODE_ENV === 'development' so production fails loudly. Example fix in src/app/api/users/route.ts:
import { prisma } from '@/lib/db'
export async function GET() {
const users = await prisma.user.findMany()
return Response.json(users)
}
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 WIP-in-Production 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-half-finished·automated