(error: z.ZodError)
| 108 | }) |
| 109 | |
| 110 | function formatFirstIssue(error: z.ZodError): string { |
| 111 | const issue = error.issues[0] |
| 112 | if (!issue) return 'invalid arguments' |
| 113 | const issuePath = issue.path.length > 0 ? `${issue.path.join('.')}: ` : '' |
| 114 | return `${issuePath}${issue.message}` |
| 115 | } |
| 116 | |
| 117 | interface ConvertToSuccessPayload { |
| 118 | inputPath: string |
no outgoing calls
no test coverage detected