(error: unknown)
| 15 | }; |
| 16 | |
| 17 | function isTRPCError(error: unknown): error is TRPCError { |
| 18 | return ( |
| 19 | typeof error === 'object' && |
| 20 | error !== null && |
| 21 | 'message' in error && |
| 22 | typeof (error as Record<string, unknown>).message === 'string' && |
| 23 | 'data' in error |
| 24 | ); |
| 25 | } |
| 26 | |
| 27 | function formatZodErrors(zodError: ZodError | undefined): string[] { |
| 28 | if (!zodError) return []; |
no outgoing calls
no test coverage detected