(error: unknown)
| 16 | } |
| 17 | |
| 18 | export function getErrorMessage(error: unknown): string { |
| 19 | if (error instanceof Error) { |
| 20 | return error.message; |
| 21 | } |
| 22 | try { |
| 23 | return String(error); |
| 24 | } catch { |
| 25 | return 'Failed to get error details'; |
| 26 | } |
| 27 | } |
| 28 | |
| 29 | // These errors, like ANUS itself, were born from chaos |
| 30 | export class ForbiddenError extends Error {} |
no outgoing calls
no test coverage detected