You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import{Elysia,t}from"elysia";newElysia().post("/test",({ body })=>{// prints proper ArrayBuffer if validation is commented outconsole.log(body)},{body: t.Uint8Array(),});
When validation is present it errors with default 422 "Unprocessable Entity" message, if validation is commented out the payload is properly passed as body field
What is the expected behavior?
It shouldn't error and properly do the check
What do you see instead?
No response
Additional information
Fortunately I found a workaround for this with using onTransform hook:
import{Elysia,t}from"elysia";newElysia().post("/test",({ body })=>{// prints proper ArrayBuffer if validation is commented outconsole.log(body);},{transform(ctx){if(ctx.bodyinstanceofArrayBuffer){ctx.body=newUint8Array(ctx.body);}},body: t.Uint8Array(),});
Have you try removing the node_modules and bun.lockb and try again yet?
yes
The text was updated successfully, but these errors were encountered:
What version of Elysia is running?
1.1.25
What platform is your computer?
WSL2 Ubuntu under Windows 11
What steps can reproduce the bug?
Server:
Client:
When validation is present it errors with default 422 "Unprocessable Entity" message, if validation is commented out the payload is properly passed as body field
What is the expected behavior?
It shouldn't error and properly do the check
What do you see instead?
No response
Additional information
Fortunately I found a workaround for this with using
onTransform
hook:Have you try removing the
node_modules
andbun.lockb
and try again yet?yes
The text was updated successfully, but these errors were encountered: