From 18a5b342d9809ecc79ed80a0e33dae440e4377ce Mon Sep 17 00:00:00 2001 From: saravanakumardb1 Date: Mon, 16 Feb 2026 23:45:17 -0800 Subject: [PATCH] fix(request-context): block sunset products in public productId resolver --- services/platform-service/src/lib/request-context.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/services/platform-service/src/lib/request-context.ts b/services/platform-service/src/lib/request-context.ts index d235cdd6..29c24548 100644 --- a/services/platform-service/src/lib/request-context.ts +++ b/services/platform-service/src/lib/request-context.ts @@ -74,15 +74,15 @@ export function getRequestProductId(req: FastifyRequest): string { } /** - * Extract productId with relaxed status gating — permits `pre_launch` and `sunset`. + * Extract productId with relaxed status gating — permits `pre_launch`. * Used by public waitlist routes where the product isn't fully operational yet. - * Blocks only: `draft`, `disabled`. + * Blocks: `draft`, `sunset`, `disabled`. */ export function getRequestProductIdForPublic(req: FastifyRequest): string { const id = extractProductId(req); const product = getProduct(id)!; - if (product.status === 'draft' || product.status === 'disabled') { + if (product.status === 'draft' || product.status === 'sunset' || product.status === 'disabled') { throw new BadRequestError(`Product ${id} is not available (status: ${product.status})`); }