Skip to content
oRPC
Esc
navigateopen⌘Jpreview
On this page

v1.7.0

Safe Client docs

If you often use safe for error handling, createSafeClient can simplify your code by automatically wrapping all procedure calls with safe. It works with both server-side and client-side clients.

import { createSafeClient } from '@orpc/client'

const safeClient = createSafeClient(client)

const [error, data] = await safeClient.doSomething({ id: '123' })

Smart Coercion Plugin docs

Automatically converts input values to match schema types without manually defining coercion logic. This plugin can support almost any standard schema.

import { OpenAPIHandler } from '@orpc/openapi/fetch'
import {
  experimental_SmartCoercionPlugin as SmartCoercionPlugin
} from '@orpc/json-schema'

const handler = new OpenAPIHandler(router, {
  plugins: [
    new SmartCoercionPlugin({
      schemaConverters: [
          new ZodToJsonSchemaConverter(), // <-- if you use Zod
          new ValibotToJsonSchemaConverter(), // <-- if you use Valibot
          new ArkTypeToJsonSchemaConverter(), // <-- if you use ArkType
      ],
    })
  ]
})

Promote stable

aws lambda, websocket, message port, zod 4 converter now stable


   🚀 Features

   🐞 Bug Fixes

  • server: Add missing export for utils in standard adapter  -  by @dinwwwh (29120)
  • trpc: Add missing exports  -  by @dinwwwh (c465e)
    View changes on GitHub

Last updated on July 14, 2025

Was this page helpful?