(value: unknown, fallback: string)
| 343 | } |
| 344 | |
| 345 | function extractInstantlyError(value: unknown, fallback: string): string { |
| 346 | const data = asRecord(value) |
| 347 | if (typeof data.message === 'string') return data.message |
| 348 | if (typeof data.error === 'string') return data.error |
| 349 | return fallback |
| 350 | } |
| 351 | |
| 352 | function asString(value: unknown): string | null { |
| 353 | return typeof value === 'string' ? value : null |
no test coverage detected