From 764e7cf49a635191b1d81bce2843d0bc132e411e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20J=C3=A4derberg?= Date: Wed, 1 Oct 2025 11:43:12 +0000 Subject: [PATCH] Merged in fix/include-info-when-missingLangInTRPC (pull request #2890) * chore: include more info when we get missing lang in tRPC context Approved-by: Linus Flood --- packages/trpc/lib/procedures.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/trpc/lib/procedures.ts b/packages/trpc/lib/procedures.ts index 70515a795..896afb5e4 100644 --- a/packages/trpc/lib/procedures.ts +++ b/packages/trpc/lib/procedures.ts @@ -33,7 +33,12 @@ export const languageProcedure = baseProcedure.use(async function (opts) { const parsedInput = langInput.safeParse(input) if (process.env.NODE_ENV === "development" && !parsedInput.success) { - throw badRequestError("Missing Lang in tRPC context") + throw badRequestError({ + message: "Missing lang in tRPC context", + path: opts.path, + type: opts.type, + input: opts.input, + }) } return opts.next({