Server Side Calls

Call tRPC procedures directly from server code using t.createCallerFactory() and router.createCaller(context) for integration testing, internal server logic, and custom API endpoints. Catch TRPCError and extract HTTP status with getHTTPStatusCodeFromError(). Error handling via onError option.

trpc 1d5964a 6.0 KB Updated

File contents

trpc/trpc/tree/main/packages/server/skills/server-side-calls commit 1d5964a4fd

Frequently asked questions

npx skillmds add trpc/server-side-calls