* 构造 CLI 错误日志上下文 * @param {Error} error - 错误对象 * @returns {Promise } 日志上下文
(error)
| 233 | * @param {Error} error - 错误对象 |
| 234 | * @returns {Promise<object>} 日志上下文 |
| 235 | */ |
| 236 | async function buildCliAxiosErrorLog(error) { |
| 237 | return { |
| 238 | message: error?.message, |
| 239 | code: error?.code, |
| 240 | status: error?.response?.status, |
| 241 | statusText: error?.response?.statusText, |
| 242 | details: await normalizeCliErrorDetails(error?.response?.data) |
| 243 | } |
| 244 | } |
| 245 | |
| 246 | function preprocessCliRequestBody(rawBody) { |
no test coverage detected