Files
xiaomai 07e5d42005 refactor: centralize validation, error handling, and formatting logic
Extract shared auth logic and validation rules to shared/auth.ts
Introduce utility functions for HTTP errors and user input parsing
Standardize error messages and date formatting across the app
2026-04-12 20:29:39 +08:00

4 lines
132 B
TypeScript

export function getErrorMessage(error: any, fallback: string) {
return error?.data?.statusMessage || error?.message || fallback
}