(error: ErrorLike, fallbackTitle = '操作失败')
| 52 | } |
| 53 | |
| 54 | export function formatErrorMessage(error: ErrorLike, fallbackTitle = '操作失败'): string { |
| 55 | const appError = normalizeApiError(error, fallbackTitle) |
| 56 | return `${appError.title}:${appError.suggestion || appError.detail}` |
| 57 | } |
| 58 | |
| 59 | export function diagnosticsText(error: AppError): string { |
| 60 | const payload = { |
no test coverage detected