(error)
| 35 | } |
| 36 | |
| 37 | function parseErrorMessage(error) { |
| 38 | const detail = error?.data?.detail; |
| 39 | if (typeof detail === 'string') return detail; |
| 40 | if (detail && typeof detail === 'object') { |
| 41 | if (typeof detail.message === 'string') return detail.message; |
| 42 | return JSON.stringify(detail); |
| 43 | } |
| 44 | return error?.message || '请求失败'; |
| 45 | } |
| 46 | |
| 47 | function getRepairName(key) { |
| 48 | return selfcheckState.repairCatalog?.[key]?.name || key; |
no outgoing calls
no test coverage detected