trpc / v10-playground

tRPC v10 procedure play
https://stackblitz.com/github/trpc/v10-playground?file=src%2Fserver%2Findex.ts,src%2Fclient.ts,src%2Fserver%2Frouters%2FpostRouter.ts&view=editor
13 stars 3 forks source link

Question: Is it sane to infer errors? #28

Closed KATT closed 2 years ago

KATT commented 2 years ago

Please discuss

How useful is it really? Unexpected errors still needs handling.

mgreenw commented 2 years ago

I don't think it's that useful, especially because it's possible to already make a "generic" error handler to render all of the trpc error codes as well as page-specific error handlers for "not found" or "bad request", etc. Definitely not worth breaking changes, but if it could be implemented with good performance and without breaking changes I'd be open to it!

KATT commented 2 years ago

Note gonna do this for now.