Skip to main content
ORPCTaggedError creates errors that are both:
  • yieldable in Effect code
  • serializable as oRPC errors

Define a tagged error

errors.ts

Register it on the builder

procedure.ts

Yield it in a handler

get-user.ts

Mix regular oRPC errors and tagged errors

mixed-errors.ts
Pass tagged error classes to .errors(...) so the procedure surface knows about the client-visible error type.

Next step

Add shared behavior with Middleware.
Last modified on June 15, 2026