Environment
orpc@1.93, node@22.19.0
Reproduction
handler:
plugins: [new StrictGetMethodPlugin()],
router:
template: publicProcedure
.route({ method: "GET", inputStructure: "detailed" })
.input(
z.object({
query: z.object({ type: z.string() }),
}),
)
.output(z.instanceof(File))
.handler(({ input }) => {
const { type } = input.query;
let csv = "";
if (type === "nodes") {
csv = [
"pid,name,age,country",
"P001,Alice,33,JP",
"P002,Bob,40,US",
].join("\n");
} else {
csv = ["pid,cid,pct", "P001,C001,0.30", "P002,C001,0.22"].join("\n");
}
return new File([csv], `${type}.csv`, {
type: "text/csv",
});
}),
Describe the bug
throw error:
[Error: Input validation failed] {
defined: false,
code: 'BAD_REQUEST',
status: 400,
data: [Object],
[cause]: [Error: Input validation failed] {
issues: [ [Object] ],
data: undefined
}
}
Additional context
No response
Logs
Environment
orpc@1.93, node@22.19.0
Reproduction
handler:
router:
Describe the bug
throw error:
Additional context
No response
Logs