Closed Huliiiiii closed 1 week ago
async function WithOutAwait(){ "use server" prisma.$executeRaw`SELECT * From User`; return console.log("WithOutAwait: ok"); } async function WithAwait(){ "use server" await prisma.$executeRaw`SELECT * From User`; return console.log("WithAwait: ok"); } <button onClick={()=>WithOutAwait()} /> // Click: WithOutAwait: ok <button onClick={()=>WithAwait()} /> // Click: Error: // [nitro] [request error] [unhandled] Invalid character in header content ["X-Error"] // at ServerResponse.setHeader (node:_http_outgoing:706:3) // at setResponseHeader (/D:/**/solid-project/.output/server/chunks/runtime.mjs:2528:18) // at /D:/**/solid-project/.output/server/chunks/runtime.mjs:5724:1057 // at Object.ye$1 [as handler] (/D:/**/solid-project/.output/server/chunks/runtime.mjs:6067:6371) // at async /D:/**/solid-project/.output/server/chunks/runtime.mjs:3039:19 // at async Object.callAsync (/D:/**/solid-project/.output/server/chunks/runtime.mjs:5340:16) // at async Server.toNodeHandle (/D:/**/solid-project/.output/server/chunks/runtime.mjs:3305:7)
The second button should work like the first.
Copy code in solid-start template with prisma can reproduce this.
No response
OS: Microsoft Windows [version 10.0.22631.3593] Node: 21.6.1 Bun: 1.1.10 (use as package manager) Pnpm: 9.1.2 Solid-Start: 1.0.0
Whether or not the use of await is there is irrelevant, seems like there's an included header with invalid characters.
await
@ryansolid seems like the X-Error setHeader needs some character sanitation
X-Error
Thanks.
Duplicates
Latest version
Current behavior 😯
Expected behavior 🤔
The second button should work like the first.
Steps to reproduce 🕹
Copy code in solid-start template with prisma can reproduce this.
Context 🔦
No response
Your environment 🌎