How to get a TRPCClientError shape as in initTRPC errorFormatter for testing
I want to test some UI logic handling errors from trpc but I struggle how to setup the error shape in the test so it triggers proper branches while test.
here is my initTrpc
Handler I want to test:
And How can I test it???
Solution:Jump to solution
OK nvm. Just found implementation of trpclienterror and you can do
```
new TRPCClientError('test3', {
result: { error: { data: { apiError: [] } } },...
1 Reply
Solution
OK nvm. Just found implementation of trpclienterror and you can do