Repository navigation
v0.25.6
@kitcn/resend
Published @kitcn/resend@0.25.6.
kitcn
Patch Changes
-
#373
118093aThanks @MikeyZhang75! - ## Patches- Fix
.output()validation failures reaching the client as an opaque
Server Error. They now throw aCRPCErrorwith code
INTERNAL_SERVER_ERROR, messageOutput validation failed, and sanitized
structural Zod issues inerror.data.ZodError, so a handler returning the
wrong shape names itself without exposing rejected server output.
.paginated()is covered too.
// A handler that returns the wrong shape c.query .output(z.object({ ok: z.boolean() })) .query(async () => ({ ok: "yes" })); // Client error.data.ZodError; // [{ expected: 'boolean', code: 'invalid_type', path: ['ok'] }]
-
Log server faults from HTTP routes. A route that fails its
.output()schema
still answers500with only a code and message, but the full error now
reaches the server log instead of being discarded. -
Ship
CHANGELOG.mdin the published package. -
Document the
.output()return contract: the handler returns the schema's
input type, anundefinedreturn is parsed as-is rather than substituted with
null, and an absent value is modelled as.nullable()rather than a
top-level.optional(), which Convex's returns validator cannot express.
- Fix