Something went wrong. Try again.
Synapse is a study workspace. Organize courses read and annotate the material, train with generated exercises and watch your progress forked from denishovart.com/synapse
Something went wrong. Try again.
1234567891011121314151617181920// A readable message from any thrown value. Tauri plugin calls and rejected// promises often throw a plain string or an object, so `(e as Error).message`// is undefined and surfaces as "Error: undefined". This always returns// something legible.export function errorMessage(e: unknown): string { if (typeof e === 'string') return e; if (e instanceof Error && e.message) return e.message; if (e && typeof e === 'object' && 'message' in e) { const m = (e as { message?: unknown }).message; if (typeof m === 'string' && m) return m; } try { const s = JSON.stringify(e); if (s && s !== '{}') return s; } catch { // fall through } return String(e);}