(res, action)
| 126 | } |
| 127 | |
| 128 | function assertOk(res, action) { |
| 129 | if (!res || res.hasError || String(res.responseCode) !== "0") { |
| 130 | throw new Error(`${action}失败: ${res?.errorMessage || res?.message || JSON.stringify(res)}`); |
| 131 | } |
| 132 | return res.data || {}; |
| 133 | } |
| 134 | |
| 135 | class Task { |
| 136 | constructor(raw) { |
no outgoing calls
no test coverage detected