danecando
danecando
TtRPC
Created by danecando on 4/17/2025 in #❓-help
Best way to wrap procedure for error handling
Wondering what's the most idiomatic way to accomplish this? I want to have a try { } catch {} that wraps each procedure and returns a generic error for uncaught (non trpc) errors It is to just created a wrapper fn ie withErrorHandling that you wrap all your procedures with? I tried middleware but it doesn't seem like you can return a different value for the error.
2 replies