export const messageOf = function messageOf(error: unknown): string { return error instanceof Error ? error.message : String(error); };