From 25aa3867b1c6e7e1bb614ac4ba89b09f5b6bf38f Mon Sep 17 00:00:00 2001 From: Bilal Godil Date: Thu, 2 Jul 2026 15:32:49 -0700 Subject: [PATCH] fix(email-themes): validate DELETE theme id as UUID The DELETE route accepted params.id as any string, but the downstream CUD delete handler validates it against a UUID schema. A malformed id therefore failed inside the handler as a HexclaveAssertionError (500) instead of a request-validation error. Constraining params.id to a UUID keeps invalid input on the 400 path. --- .../src/app/api/latest/internal/email-themes/[id]/route.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/backend/src/app/api/latest/internal/email-themes/[id]/route.tsx b/apps/backend/src/app/api/latest/internal/email-themes/[id]/route.tsx index f30090bbe..70f76b1b6 100644 --- a/apps/backend/src/app/api/latest/internal/email-themes/[id]/route.tsx +++ b/apps/backend/src/app/api/latest/internal/email-themes/[id]/route.tsx @@ -62,7 +62,7 @@ export const DELETE = createSmartRouteHandler({ tenancy: adaptSchema.defined(), }).defined(), params: yupObject({ - id: yupString().defined(), + id: yupString().uuid().defined(), }).defined(), }), response: yupObject({