go-guess/frontend/src/components/actions/errorMessage.ts
Daniel Noulet 5d7a57fd00 refactor: split frontend application features
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-20 08:08:16 +02:00

7 lines
204 B
TypeScript

import { ApiError } from '../../api/client'
export function errorMessage(error: unknown) {
return error instanceof ApiError || error instanceof Error
? error.message
: 'Something went wrong'
}