danecando
danecando2w ago

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.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?