How can i check if an error is a TRPC Error in the browser?
error.message // NOT_FOUND (throwing this intentionally - i'd like to build a react error boundary that has specific handling for TRPC Errors like NOT_FOUND)Object.getPrototypeOf(error) // default "Error" object/classerror instanceof TRPCClientError // false. this would have been my best bet.
error.message // NOT_FOUND (throwing this intentionally - i'd like to build a react error boundary that has specific handling for TRPC Errors like NOT_FOUND)Object.getPrototypeOf(error) // default "Error" object/classerror instanceof TRPCClientError // false. this would have been my best bet.