(error: ApiClientError)
| 152 | } |
| 153 | |
| 154 | function codeFromApiClientError(error: ApiClientError): string { |
| 155 | if (error.body && typeof error.body === 'object') { |
| 156 | const code = (error.body as { error?: unknown }).error |
| 157 | if (typeof code === 'string' && code.length > 0) return code |
| 158 | } |
| 159 | |
| 160 | return codeFromStatus(error.status) |
| 161 | } |
| 162 | |
| 163 | export default function Invite() { |
| 164 | const router = useRouter() |
no test coverage detected