PRD-specified error states are requirements, not suggestions. When a user hits their usage quota and your app returns an unhandled 429 or a generic error page instead of the renewal prompt your PRD specified, you have broken the user experience the product owner signed off on. More critically, unhandled error paths often expose raw API error messages, stack traces, or internal IDs to end users — a violation of both good UX and basic information security hygiene. ISO 25010:2011 reliability requires that specified failure scenarios are handled gracefully, not just that happy paths work.
Medium because unhandled PRD error states degrade user experience and may leak internal error details, but do not directly expose a security-critical attack vector.
For each unhandled PRD error scenario, locate the triggering condition in your API route handlers and add the corresponding UI state. In a Next.js app, quota exceeded handling looks like:
// src/app/api/generate/route.ts
if (userUsage >= plan.limit) {
return NextResponse.json(
{ error: 'quota_exceeded', upgradeUrl: '/pricing' },
{ status: 402 }
)
}
Then handle it in the client component in src/components/ with a modal or inline message matching your PRD spec. Cross-check every error scenario in your PRD against the response codes your API routes actually return — the gap is usually in the client-side error boundary, not the server logic.
goal-alignment.ux-alignment.error-handling-covers-prd-edge-casesmedium"PRD specifies handling for expired subscription (show renewal modal) and rate limit exceeded (show retry countdown). Neither is implemented." Max 500 chars.src/app/ route handlers and add the corresponding UI state. These are requirements, not nice-to-haves — your PRD already decided they matter enough to specify.