From 8bb2bfaedf4166f08abe4ed9295a4e1818c9641c Mon Sep 17 00:00:00 2001 From: Alex MacCaw Date: Fri, 18 Aug 2023 15:39:41 -0400 Subject: [PATCH] don't lowercase --- package.json | 2 +- src/middleware/zod-validation.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3aeec96..d8f0e80 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cloudflare-basics", "type": "module", - "version": "0.0.7", + "version": "0.0.8", "packageManager": "pnpm@8.5.1", "description": "", "author": "Alex MaccCaw ", diff --git a/src/middleware/zod-validation.ts b/src/middleware/zod-validation.ts index eef7f2f..acc9088 100644 --- a/src/middleware/zod-validation.ts +++ b/src/middleware/zod-validation.ts @@ -47,7 +47,7 @@ export function withZod( const firstError = result.error?.errors?.[0] if (firstError) { - return error(`${firstError.path} ${firstError.message}`.toLowerCase(), { + return error(`${firstError.path} ${firstError.message}`, { type: firstError.code, status: 400, })